Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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)

share|improve this question
add comment

1 Answer

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.

share|improve this answer
    
Is this it? modrails.com/documentation/… –  Blankman Dec 5 '10 at 15:59
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.