3

I'm running a new Rails 3 app through Apache Passenger, and am trying to run it in the stage environment. I have my configuration file set up properly according to the documentation as well as previous Apache Passenger apps, but I can't get it to run in the proper environment, even though I'm specifying it in my VirtualHost config as so:

RailsEnv stage

Any suggestions?

Note: If it matters, I'm using Ruby 1.9.2-p0

5

Rails 3 counts as a rack application, so change the config to:

RackEnv stage
0

It seems there is a bug in Passenger at least up to 3.0.5 where the RackEnv cannot differ between virtual hosts. If you have multiple virtual hosts with different RackEnv settings, then the first RackEnv that is used will be global, i.e. the first site that a browser hits will define RackEnv setting for all virtual hosts.

This needs to be fixed quickly, it makes setting up staging environments for production sites next to impossible, and also makes multi-stage environments (e.g. hosting) impossible.

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.