Lack of a secret key base for the production environment

My situation is very similar to SemiFixed: There is no `secret_key_base` environment for 'production' :

my config / secrets.yml

production: secret_key_base: <%= ENV["SECRET_KEY_BASE"] %> 

I added an entry in / etc / environment so that when you log in and type

 echo $SECRET_KEY_BASE 

I get a long string that I created with a secret rake. But still I get 500 errors for Missing secret_key_base for the "production" environment, set this value to config / secrets.yml, even after I reset the entire computer. So what else could go wrong?

+6
ruby-on-rails
source share
1 answer

Found that / etc / environment is ignored by apache2. Add the following problem to / etc / apache 2 / envvars:

 export SECRET_KEY_BASE=<the long string> 
+8
source share

All Articles