Question

For Ruby on Rails applications, I've noticed that I don't have the option to do a ENV['NUCLEAR_LAUNCH_CODES'] = 12345 anywhere unlike Heroku.

For a Rails 3.2.17 application, does anyone know what the best practice is?

Was it helpful?

Solution

You can set environment variables with figaro gem.

OTHER TIPS

You can use this recipe from Engine Yard.

If you have some sensitive data in your environment vars, the custom recipe allow you to manage your vars outside your application repos.

Your application can use environment vars configured in the recipe after you apply the recipe.

But if you use rails console via ssh, you have to explicitly read and execute the config file before you enter a console.

source /data/YOUR_APP_NAME/shared/config/env.custom
bundle exec rails console
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top