Rails 2.3.3 - Configuring Production Mode

How to configure the application in working mode?

Well, this should be no problem, but I'm going to deploy my first Rails application, and I have everything set up correctly: Ubuntu Hardy, Passenger, MySQL. However, it still works in development mode. I was only able to find documentation for earlier versions of Rails and want to make sure that I am doing this correctly.

Thanks in advance.

+6
mysql ruby-on-rails production passenger
source share
3 answers

You will need to install RackEnv instead of RailsEnv. In fact, I'm just doing both (although I may not need to ...?).

A vhost example for a Rails 2.3 application:

<VirtualHost *:80> ... RackEnv production RailsEnv production ... </VirtualHost> 
+7
source share

passenger by default starts everything in production mode, unless you specify otherwise:

RailsEnv Passenger Documentation

If you create a view that displays RAILS_ENV, does it say 'development'?

  • If so, then you can set the RAILS_ENV variable to "development" somewhere in the environment.rb file.
  • If you do not see this and see other symptoms, can you list the symptoms?
+2
source share

Based on docs you can install RailEnv. By default, Passenger starts up in production mode, so you may have copied RailsEnv development into your configuration.

0
source share

All Articles