title: passenger/nginx - environment variable passing, or passenger variable passing
body: <p>We have 2 rails environments with the same code. One is staging, the other production. Both run using the same 'production' rails settings.</p>
  
  <p>But, we'd like to know what environment we are on. I thought I could set an environment variable on the servers and read that out inside of rails, but, while that works from the console it doesn't work when running behind passenger.</p>
  
  <p>in the admin users .profile file I have:</p>
  
  <pre><code>export MC_TEST=true
  </code></pre>
  
  <p>But the nginx's/passengers running don't seem to be inside that same environment, and that variable is not set.</p>
  
  <p>I thought I could then maybe put something in the nginx.conf to get passed back to the rails environment, but obviously I am not doing that right either!</p>
  
  <p>So - can anyone tell me how to properly do this? Under no circumstances do we want this variable in ruby/rails/app code.</p>