4

I'm following the Learn Ruby on Rails - RailsApps tutorial. In the config section, it talks about opening either .bashrc or .bash_profile and seeing a export path command. Both of those files are blank. And the tutorial is asking me to record environment variables in one of those two files. I am assuming the file to be the one with an export path. Since both of my files are blank does it matter which file I record the environment variables to? Running OS X 10.9.4 and using rvm.

These are the variables:

export GMAIL_USERNAME="example@gmail.com"
export GMAIL_PASSWORD="Your_Password"
export MAILCHIMP_API_KEY="Your_MailChimp_API_Key"
export MAILCHIMP_LIST_ID="Your_List_ID"
export OWNER_EMAIL="example@gmail.com"
ray
  • 5,454
  • 1
  • 18
  • 40
MMark
  • 149
  • 2
  • 12
  • 1
    What OS are you on? It's not common to have empty ~/.bashrc or ~/.bash_profile. – the Tin Man Jul 08 '14 at 23:44
  • 1
    Check those files in your home directory, e.g. `vi ~/.bashrc`. If you're just on the local machine it doesn't matter which file you put them in. – ian Jul 09 '14 at 00:14

2 Answers2

2

That tutorial was probably referring to Linux. In OS X it's more common to place this information into ~/.profile (Although adding to ~/.bash_rc should still work). This will only work if your ~/.bash_profile does not exist (see here)

Chances are your .profile will not be empty either.

Community
  • 1
  • 1
Martin Konecny
  • 57,827
  • 19
  • 139
  • 159
1

Just add those things to .bashrc, if it doesn't exist in your home directory just create it.If you are wondering this are called enviorment variables and by export you make them available to the shell when your .bashrc is ran. This happens because every time you open a terminal your .bashrc is executed.It is not that simple but if you want deeper understanding read about bash and unix shell.

hahcho
  • 1,369
  • 9
  • 17