I have a shared server running passenger to server my Rails app. For some reason my RAILS_ENV variable seems to be stuck as 'Development'. How do I set it to 'Production'? Thanks
Asked
Active
Viewed 3,142 times
1 Answers
6
In a shared hosting environment, you will want to do this in a .htaccess
file, placed inside public/
. Mine looks like this:
PassengerEnabled on
PassengerAppRoot /home/myuser/myapp/current
RailsEnv production

Paul Schreiber
- 12,531
- 4
- 41
- 63
-
1You may also need `RackEnv production` for Rails 3. – Paul Schreiber Feb 22 '11 at 07:01
-
My folder structure is as so /home/user/domain/myapp/public Would I create the .htaccess file inside that public folder? Note: I have not yet set up capistrano to deploy the app. – aren55555 Feb 23 '11 at 14:53
-
Yes, inside that public folder. – Paul Schreiber Feb 24 '11 at 02:45
-
1`RailsEnv production` was what I was looking for. – Ben Kreeger Jan 13 '12 at 17:53