Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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

share|improve this question
add comment

2 Answers

up vote 4 down vote accepted

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

RackEnv stage
share|improve this answer
add comment

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.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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