前提・実現したいこと
デプロイのためにec2にログインした状態でbundle exec rails assets:precompile RAILS_ENV=productionを実行するとタイトルのエラーメッセージが出現します。
なにが原因なのか検討がつきませんでした。
発生している問題・エラーメッセージ
Yarn executable was not detected in the system. Download Yarn at https://yarnpkg.com/en/docs/install 〜省略〜 bin/rails: No such file or directory - yarn rails aborted! NoMethodError: undefined method `strip' for nil:NilClass /home/ec2-user/WebWorks/vendor/bundle/ruby/2.6.0/gems/webpacker-5.2.1/lib/tasks/webpacker/check_yarn.rake:6:in `block (2 levels) in <main>' /home/ec2-user/WebWorks/vendor/bundle/ruby/2.6.0/gems/webpacker-5.2.1/lib/tasks/webpacker/compile.rake:14:in `block in enhance_assets_precompile' /home/ec2-user/WebWorks/vendor/bundle/ruby/2.6.0/gems/railties-5.2.4.4/lib/rails/commands/rake/rake_command.rb:23:in `block in perform' /home/ec2-user/WebWorks/vendor/bundle/ruby/2.6.0/gems/railties-5.2.4.4/lib/rails/commands/rake/rake_command.rb:20:in `perform' /home/ec2-user/WebWorks/vendor/bundle/ruby/2.6.0/gems/railties-5.2.4.4/lib/rails/command.rb:48:in `invoke' /home/ec2-user/WebWorks/vendor/bundle/ruby/2.6.0/gems/railties-5.2.4.4/lib/rails/commands.rb:18:in `<main>' /home/ec2-user/WebWorks/vendor/bundle/ruby/2.6.0/gems/bootsnap-1.5.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require' /home/ec2-user/WebWorks/vendor/bundle/ruby/2.6.0/gems/bootsnap-1.5.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi' /home/ec2-user/WebWorks/vendor/bundle/ruby/2.6.0/gems/bootsnap-1.5.1/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register' /home/ec2-user/WebWorks/vendor/bundle/ruby/2.6.0/gems/bootsnap-1.5.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi' /home/ec2-user/WebWorks/vendor/bundle/ruby/2.6.0/gems/bootsnap-1.5.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require' /home/ec2-user/WebWorks/vendor/bundle/ruby/2.6.0/gems/activesupport-5.2.4.4/lib/active_support/dependencies.rb:291:in `block in require' /home/ec2-user/WebWorks/vendor/bundle/ruby/2.6.0/gems/activesupport-5.2.4.4/lib/active_support/dependencies.rb:257:in `load_dependency' /home/ec2-user/WebWorks/vendor/bundle/ruby/2.6.0/gems/activesupport-5.2.4.4/lib/active_support/dependencies.rb:291:in `require' bin/rails:9:in `<main>' Tasks: TOP => webpacker:compile => webpacker:verify_install => webpacker:check_yarn
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。