Switching to production environment


#1

Hey All,

I can’t seem to find a straight answer, but I was wondering if
someone could provide me with a simple explanation of switching to
the production environment. It looks like I could just alter
environments.rb under /config, but that seems like a hack. How would
I go about getting my application running in the production environment?

Cheers,
Eric Czarny

removed_email_address@domain.invalid


#2

On Feb 21, 2006, at 10:25 AM, Eric Czarny wrote:

I can’t seem to find a straight answer, but I was wondering if
someone could provide me with a simple explanation of switching to
the production environment. It looks like I could just alter
environments.rb under /config, but that seems like a hack. How
would I go about getting my application running in the production
environment?

Uncomment this line in environment.rb:

ENV[‘RAILS_ENV’] ||= ‘production’

Then, you can set the RAILS_ENV environment variable
before starting the application.


– Tom M.


#3

As is mentioned in the very environment.rb, set it in your app/web
server. SCGI has an environment setting in its YAML config. WEBrick has
a command line option (not that you’d want to really use it for full-on
production).

Joe