Cannot load Rails.config.active_storage.service
I think you're missing the master.key
file in your server. Check your local repo in config/master.key
(this file is added to your .gitignore
by default).Add this file to your server or set ENV["RAILS_MASTER_KEY"]
.
Go into config/environments/development.rb
and make sure you have this:
config.active_storage.service = :local
in config/environments/production
you should have
config.active_storage.service = :amazon
amazon
is for Amazon S3. It can be changed to whichever storage service you want to use. See the Rails docs for more info on storage services and Active Storage.
This worked for me on huroku. In settings config vars add RAILS_MASTER_KEY as key.
In your config/master.key
file in your rails app, add the chain of character as your value in heroku.