Skip to content

Instantly share code, notes, and snippets.

@skplunkerin
Last active August 29, 2015 14:10
Show Gist options
  • Save skplunkerin/8479a942217e88faf0fb to your computer and use it in GitHub Desktop.
Save skplunkerin/8479a942217e88faf0fb to your computer and use it in GitHub Desktop.
rails ENV env, how do I setup rails env variables
  • check comment reply from Kori Roys

Open .bash_profile

vim ~/.bash_profile

Add the two ENV variables like so:

i.e. ENV['TWITTER_KEY'] && ENV['TWITTER_SECRET']

export TWITTER_KEY=your_twitter_key
export TWITTER_SECRET=your_twitter_secret

Save and close the file

:wq

Either quit your terminal session & restart or reload it with:

source ~/.bash_profile
@skplunkerin
Copy link
Author

This is definitely a "quick and dirty" method for understanding how to get ENV working. This is pretty hard (for me) to find this answer on the web... I always happen to stumble upon an answer in comments (just like this one).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment