Skip to content

Instantly share code, notes, and snippets.

@jeremymouton
Created April 23, 2013 02:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jeremymouton/5440350 to your computer and use it in GitHub Desktop.
Save jeremymouton/5440350 to your computer and use it in GitHub Desktop.
Loading local environment keys in rails project
# In <code>config/environment.rb</code>
keys = File.join(Rails.root, 'config', 'keys.rb')
load(keys) if File.exists?(keys)
# In <code>config/keys.rb</code>
ENV['KEY'] = 'value'
# When adding production keys to heroku, use:
heroku config:add KEY='value'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment