LoginSignup
0
0

More than 1 year has passed since last update.

Rails初心者 「rails s -b 0.0.0.0」でサーバー立ち上げ時にエラーが起きた時の対処方法【自分用備忘録】

Last updated at Posted at 2021-09-09

この記事の対象

Railsをインストールし、アプリを作成して、ローカルサーバーを立ち上げ用としたら以下のエラーが返ってきた

Error: No such file or directory @ realpath_rec - /Users/アプリの保存場所/アプリ名/config/webpacker.yml (RuntimeError)

RailsのバージョンによってはRailsの他にインストールが必要なパッケージがある

Rails6からという記事を見たが、、、以下の2つをインストールしなければサーバーが立ちあがらない

  1. webpacker
  2. yarn

webpackerのインストール

rails webpacker:install

もし「Yarn」がインストールされていなければ以下のエラーが出ます

Yarn not installed. Please download and install Yarn from https://yarnpkg.com/lang/en/docs/install/
Exiting!

yarnのインストール [Homebrewを使用]

brew install yarn

→完了!! webpackerのインストールに戻る

スクリーンショット 2021-09-09 23.16.53.png

「rails s -b 0.0.0.0」を起動

いかがでしょうか。

スクリーンショット 2021-09-10 0.06.46.png

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0