My situation is very much like SemiFixed: Missing `secret_key_base` for 'production' environment :
my config/secrets.yml
production:
secret_key_base: <%= ENV["SECRET_KEY_BASE"] %>
I have added an entry in /etc/environment so that when I log in and type
echo $SECRET_KEY_BASE
I get the long string I created with rake secret. But still I get 500 error for Missing secret_key_base for 'production' environment, set this value in config/secrets.yml, even after I reset the entire computer. So what else can go wrong?
Found out that /etc/environment is ignored by apache2. Add the following to /etc/apache2/envvars solved my problem:
export SECRET_KEY_BASE=<the long string>
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