Dom
Dom

Reputation: 1486

Passenger 2.2.9 Ruby EE Ubuntu.. Can't get it to use 'default' production environment

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

Upvotes: 0

Views: 280

Answers (2)

Dom
Dom

Reputation: 1486

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)

Upvotes: 0

smathy
smathy

Reputation: 27961

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.

Upvotes: 2

Related Questions