apache environment variables in rails

143 views
Skip to first unread message

Cristian

unread,
Nov 17, 2008, 7:43:03 PM11/17/08
to Phusion Passenger Discussions
Hello,

I installed Centos5 + Apache-2.2 + Passenger (w/ rails 2.1.0) but I
don;t know how to list the Apache Env Variables

I'm looking for the RoR equivalent of:

#!/usr/local/bin/perl
print "Content-type: text/html\n\n";
foreach $key (sort keys(%ENV)) {
print "$key = $ENV{$key}<br>";
}


I tried:

<% if @env.blank? %>
<p>There are no ENV variables.</p>
<% else %>
<p>ENV</p>
<% @env.each do |e| %>
<%= e %>
<% end %>
<% end %>



<% if @ENV.blank? %>
<p>There are no ENV variables.</p>
<% else %>
<p>ENV</p>
<% @ENV.each do |e| %>
<%= e %>
<% end %>
<% end %>

but it always shows blank.

thanks!

Cody Caughlan

unread,
Nov 17, 2008, 7:44:07 PM11/17/08
to phusion-...@googlegroups.com
request.env ?

Cristian

unread,
Nov 17, 2008, 8:01:20 PM11/17/08
to Phusion Passenger Discussions
ty!
Reply all
Reply to author
Forward
0 new messages