LoginSignup
0
0

More than 1 year has passed since last update.

Heroku Railsアプリデプロイ時にrake assets:precompileでNoMethodError: undefined method `[]' for nil:NilClass

Last updated at Posted at 2021-10-17

久しぶりに rails new して Herokuにデプロイした時にエラー

-----> Preparing app for Rails asset pipeline
       Running: rake assets:precompile
       rake aborted!
       NoMethodError: undefined method `[]' for nil:NilClass

master.keyをHeroku環境変数に設定する

master.keyが登録されていないことが原因でした。
以下のコマンドで解決

$ heroku config:set RAILS_MASTER_KEY=`cat config/master.key`
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