Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have mod_rails and Ruby Enterprise edition. I have an error the the process spawner cannot find the fastthread gem. The problem is that the gem is installed by passenger is looking into the gem directory of the standard MRI version. I should set the GEM_PATH the same as my user. Since www-data is a special user, without any home directory and profile, how can I set that environment variable?

There should be a way to pass enviroment variable to the Apache user.

share|improve this question
up vote 0 down vote accepted

are you sure your mod_rails is using REE and not MRI ? Check your PassengerRuby setting in apache.

usually you shouldn't have to pass any GEM_PATH since each ruby binary knows where its gems are installed. so what you might need to do is to install your gems in the proper location. your REE should have installed its own version of gem (I think it should be called gemee, or gem-ee or smth like that) so use it to see which gems are intsalled in REE environment.

share|improve this answer
I thing you are right, probably Passenger is using MRI. How and where I should set up PassengerRuby? I tried inside the <directory> directive but I get an error. Thanks – rtacconi Feb 22 '10 at 17:40
How to set up PassengerRuby;… – rtacconi Feb 22 '10 at 18:02
if you followed the passenger install you should already have PassengerRuby in a conf file under /etc/apache, just grep for it: grep -nsri PassengerRuby /etc/apache* it can't be set for a directory, it should be set globally. – Vitaly Kushner Feb 22 '10 at 22:56
on my ubuntu setup passenger config is in 2 files: /etc/apache2/mods-available/passenger.load and /etc/apache2/mods-available/passenger.conf – Vitaly Kushner Feb 22 '10 at 22:57

Your Answer


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.