0

I want to set GEM_HOME and GET_PATH when nginx starts, is the /etc/init.d/nginx script an ideal place for this, specifically the function start() ?

Do I just add: export GEM_HOME=/path/to/home/... export GEM_PATH=/path/to/gempath/....

Does this seem ok?

(i'm running nginx that was installed by phusion, rails3, rvm on ubuntu)

Blankman
  • 2,891
  • 10
  • 39
  • 68

1 Answers1

0

Nginx talks with ruby through passenger or HTTP, it does not integrate ruby into its process Apache does so while you can set an environment variable that variable will only be available to Nginx, not Ruby.

What you should do is go read the passenger documentation as it adds directives to the Nginx configuration where you can set these things.

Martin Fjordvald
  • 7,749
  • 1
  • 30
  • 35
  • Is this it? http://www.modrails.com/documentation/Users%20guide%20Nginx.html#_passenger_set_cgi_param_lt_cgi_environment_name_gt_lt_value_gt – Blankman Dec 05 '10 at 15:59