I am using Heroku with Rails 6 and Postgres. I am trying to use heroku open to start the app, but the build fails and this is shown in the logs:
-----> Detecting rake tasks
-----> Preparing app for Rails asset pipeline
Running: rake assets:precompile
DEPRECATION WARNING: Including LoggerSilence is deprecated and will be removed in Rails 6.1. Please use `ActiveSupport::LoggerSilence` instead (called from <top (required)> at /tmp/build_9537ba0878cb8933c15686548eb3ccb5/config/application.rb:7)
Missing encryption key to decrypt file with. Ask your team for your master key and write it to /tmp/build_9537ba0878cb8933c15686548eb3ccb5/config/master.key or put it in the ENV['RAILS_MASTER_KEY'].
!
! Precompiling assets failed.
!
! Push rejected, failed to compile Ruby app.
! Push failed
I have tried to run some of the commands mentioned in these two links, but none seem to work:
https://github.com/rails/rails/issues/32947
Ask your team for your master key and put it in ENV["RAILS_MASTER_KEY"] on heroku deploy
I'm also wondering if these workflows are environment specific.
You need to add the rails master key as an environment variable to heroku.
config/master.key file in your computerAdd master key to heroku as environment variable
heroku config:set RAILS_MASTER_KEY=your-master-key
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With