I am developing a Rails 4 app using the Active Admin gem for the administration back end. Active Admin in turn uses Devise for user authentication. Now, when I try to deploy
Fix:
In the production server:
sudo -H nano /etc/environment
Then in the file add:
export SECRET_KEY_BASE="yourkey"
export DEMO03_DATABASE_PASSWORD="yourpass"
to set this permanently, and system wide (all users, all processes) add set variable
In the local project devise.rb
file:
config.secret_key = ENV["SECRET_KEY_BASE"] if Rails.env.production?
Technical details: