LoginSignup
1
1

More than 3 years have passed since last update.

rails sができない!!

Posted at

発端

Railsの開発環境を構築した後、その環境で1発目のrails sを実行したとき以下のようなエラーがでました。

=> Booting Puma
=> Rails 6.1.3.1 application starting in development 
=> Run `bin/rails server --help` for more startup options
sh: yarn: command not found


========================================
  Your Yarn packages are out of date!
  Please run `yarn install --check-files` to update.
========================================


To disable this check, please change `check_yarn_integrity`
to `false` in your webpacker config file (config/webpacker.yml).





Exiting

  

エラーメッセージ通り"yarn isntall --check-files"を実行しましたが、yarnというコマンドが見つからないと言われてしまいました。

原因

環境構築の段階でyarnのインストールを忘れていたようです(笑)
凡ミス(笑)

解決

Homebrewがインストールしてある場合は以下のコマンドでyarnがインストールできます。

$ brew update
$ brew install yarn
$ yarn install --check-files

これでrails sが無事実行できるようになりました!!

1
1
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
1
1