Passenger 2.1.1 and Local Production Environment
If you’re on the Passenger 2.1.1 beta and can’t figure out why your rails app is going in to the production mode, it’s because it sets the RackEnv environment variable production instead of the RailsEnv variable. This is fine on rails 2.3+ apps because they are based on Rack but if you have a rails 2.2.2 app or below, you’ll need the following in your apps passenger site config:
<VirtualHost*:80> ServerName myserver.local DocumentRoot "/myapp/public" RackEnv development RailsEnv development <directory "/myapp/public"> Order allow,deny Allow from all </directory> </VirtualHost>
Update: I thought I should add, based on Hongli Lai’s response in the comments, that this is with me using the passenger preference pane in Leopard. That might be the culprit. Is anyone else seeing this problem? Let me know in the comments.