get you? I noticed this weekend that Apache2 seems to define ENV in some kind of weird way. If it at all does. ENV == {} in environment.rb for me. I’m curious what the deal is.
If you are using Apache2 to proxy to Mongrel, then the Mongrel
processes need to be running in Rails production mode, and nothing you
do in Apache config will help.
Oh, I’m sure I should be but my budget has me on shared hosting at the moment and last time I looked Mongrel and shared hosting didn’t want to play well together. I do run Mongrel on my desktop to develop but even here when I use Apache[2] I don’t mongrelize because that’s not what the end host is.
Yeah. I am a DHer. There’s also the stopgap line like that you can uncomment in config/environment.rb [which for me was just as easy to uncomment via Capistrano on deploy] but I was curious about finding the real solution to Apache2’s problem. Which, I guess, we did find with that whole request scope issue.
I did discover the perfect reaper action though, for Apache2 [presuming you’re not using Mongrel]
script/process/reaper -a graceful -d dispatcher.fcgi
Seems like the default reaper task doesn’t actually restart the dispatcher. If you run it multiple times, watch the PID[s] it says it’s restarting. They never change because they’re never affected. Graceful works nicely though and actually stops the dispatcher. Just a tip.