rails 4.1 production setting uses secret_key_base by reading values from the environment for security reason. If ENV["SECRET_KEY_BASE"] doesn't exist nginx + passenger will raise error. You can simply set up envrionment variable in the shell, but under rvm, it sometimes gets tricky.
Use figaro gem and set it up
- Gemfile, add
gem 'figaro'
andbundle update
figaro install
: this does- create config/application.yml
- append .gitignore
- config/application.yml, add
SECRET_KEY_BASE: your_key
- your_key can be generated by
rake secret