Add dotenv to Gemfile
This is how I'm managing environment variables. My deploy script copies the .env file from a separate directory into the config/ folder of the rails application.