views:

119

answers:

2

Using Apache2 (2.2.12) / Passenger (2.2.9)..

Have 2 apps running.. One runs fine in production mode the other insists on being in development mode.

Have booted mongrel into production mode and the app works fine.. (script/server -e production)

Tried the following with no result...

Forced the RailsEnv in the apache virtual host.

Forced the RailsEnv in the passenger.conf in /etc/apache2/mods-available

=> Although production is the default mode I cannot get it to use production

I suspect the issue is somewhere between apache / passenger (and not in the rails app)

Any ideas? or suggestions

+2  A: 

This is probably because you have a config.ru file in your RAILS_ROOT which means that Passenger is running your Rails application as a Rack application, which means that you need to set RackEnv and not RailsEnv in your apache configuration.

Jason King
A: 

Thanks Jason.. set me on the right track.. Actually had to remove the config.ru to get it working.. Think the issue had to do with the passenger version, since I have it working with the config.ru on other servers (only diff is the passenger version)

Dom
Yeah, previous versions of Passenger didn't include the same support for rack apps. It trips up many people.
Jason King