#発端
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が無事実行できるようになりました!!