Forum: Ruby on Rails problem with environmental variables and FastCGI

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
B78b4458991fb48b4cc0e9defb488730?d=identicon&s=25 sfmcfar (Guest)
on 2006-04-25 17:40
(Received via mailing list)
Hi,

I'm trying to deploy my app using FastCGI, and I have a problem.  The
application
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,
my
ENV hash is correctly set, but under FastCGI, the ENV hash is completely
empty.  I
thought that environment variables were automatically passed to the
FastCGI
app
as if it was a regular CGI application.

Can someone help?

Thanks,

Stan McFarland
--
View this message in context:
http://www.nabble.com/problem-with-environmental-v...
Sent from the RubyOnRails Users forum at Nabble.com.
B78b4458991fb48b4cc0e9defb488730?d=identicon&s=25 sfmcfar (Guest)
on 2006-04-26 00:27
(Received via mailing list)
More info:

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

Any suggestions?  I'm desperate.  ;)
--
View this message in context:
http://www.nabble.com/problem-with-environmental-v...
Sent from the RubyOnRails Users forum at Nabble.com.
This topic is locked and can not be replied to.