Passenger: specifying the environment

Passenger runs in production by default.

To run in development, update your Virtual Host and set the Rails Environment variable, e.g.:

RailsEnv development

e.g. here’s my full Passenger VirtualHost config:

<VirtualHost *:80>

        ServerName server.name.here

        # !!! Be sure to point DocumentRoot to ‘public’!

        DocumentRoot “/path/to/public”

        RailsEnv development

        <Directory “/path/to/public”>

                Order allow,deny

                Allow from all

                # This relaxes Apache security settings.

                AllowOverride all

                # MultiViews must be turned off.

                Options -MultiViews

        </Directory>

</VirtualHost>

See also this discussion:

http://code.google.com/p/phusion-passenger/issues/detail?id=45

and this:

http://my.opera.com/williamn/blog/2009/03/03/how-to-make-phusion-passenger-run-in-development-mode

Leave a Reply

Your email address will not be published. Required fields are marked *