How do I set RAILS_ENV to 'Production' on a DreamHost shared server?

3.1k Views Asked by At

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

1

There are 1 best solutions below

4
On BEST ANSWER

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