新規アプリ作成に入り、 $ rails new のあと
.....
$ rails s にて localhost:3000 が立ち上がらない場合に解決した方法。
ーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーー
結論:初心者のため、 「rails s 立ち上がらない 」等の検索を先に行ってみたが、
結局の解決方法は(実行するべきコマンドすらもが)書いてある,という事で、今後の勉強になりました。
ーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーー
Webpacker configuration file not found /Users/..../config/webpacker.yml. Please run rails webpacker:install Error: No such file or directory @ rb_sysopen - .../config/webpacker.yml (RuntimeError)
エラー文の中に、webpackerファイルが無い、インストールするように出た為、
$ rails webpacker:install
Yarn not installed. Please download and install Yarn from https://yarnpkg.com/lang/en/docs/install/
すると、今度は https://yarnpkg.com/lang/en/docs/install/
からダウンロードするように出る。
$ brew install yarn で出来るとサイト内にある為、コマンド実行。
You should change the ownership of these directories to your user.sudo chown -R $(whoami) /usr/local/share/man/man5 /usr/local/share/man/man7
すると今度は、権限を変えるように出た為、書いてある通りにコマンド実行。
($ ls -lで 現在の確認を一応行い)
$ sudo chown -R $(whoami) /usr/local/share/man/man5 /usr/local/share/man/man7
(パスワード:入力成功)
$ rails s 成功
無事にいつもの画面が出た。
余談
作成したrailsアプリをコピー等してフォルダ移動した場合:
ターミナルで、移動したフォルダに入り、
再度 $ rails s
*最近、知識が薄い私は混乱した。
railsを離れ、JavaSprict等で htmlファイルをネットにひっぱっていた為、そもそも rails s を忘れていた。
どこかにPathが書いてある?。。。と錯覚した。そもそも rails s でした!!