Reputation: 485
I am trying to deploy my rails app to my production server. However my app won't use any of my production config.
I am manually setting RAILS_ENV using:
export RAILS_ENV=production
Then when I run echo $RAILS_ENV I am returned production but only for that bash session. I have also added export RAILS_ENV=production in my .bashrc file, however still when I echo rails_env it returns blank. This means that when my rails app runs it uses development config.
How can I set this so that my rails app will use my production config? Preferably so that it is permanent so that I don't have to keep setting it.
Thanks!
Upvotes: 5
Views: 5457
Reputation: 1567
To make it system wide, add it to the /etc/profile file, or create a new file in /etc/profile.d and add as
export RAILS_ENV=production
Upvotes: 7