Forum: Ruby on Rails problem with environmental variables and FastCGI

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
sfmcfar (Guest)
on 2006-04-25 19:40
(Received via mailing list)

I'm trying to deploy my app using FastCGI, and I have a problem.  The
works correctly in either FastCGI or CGI mode (toggling between
dispatch.fcgi and
dispatch.cgi in my public/.htaccess file) except that under regular CGI,
ENV hash is correctly set, but under FastCGI, the ENV hash is completely
empty.  I
thought that environment variables were automatically passed to the
as if it was a regular CGI application.

Can someone help?


Stan McFarland
View this message in context:
Sent from the RubyOnRails Users forum at
sfmcfar (Guest)
on 2006-04-26 02:27
(Received via mailing list)
More info:

I can access the environmental variables from the controller or the view
using @request.env - this has the environment populated successfully.
Here's my problem, though.  I need to be able to access the environment
a method in a model, and @request is not defined in the model.   As I
earlier, ENV is defined via CGI, which I *can* refer to in the model,
it's not defined if I use FastCGI.

Any suggestions?  I'm desperate.  ;)
View this message in context:
Sent from the RubyOnRails Users forum at
This topic is locked and can not be replied to.