0

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.

rtacconi
  • 745
  • 4
  • 14
  • 28

1 Answers1

0

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.

Vitaly Kushner
  • 1,187
  • 9
  • 8
  • I thing you are right, probably Passenger is using MRI. How and where I should set up PassengerRuby? I tried inside the directive but I get an error. Thanks – rtacconi Feb 22 '10 at 17:40
  • How to set up PassengerRuby; http://serverfault.com/questions/60222/apache-dispatch-fcgi-doesnt-get-interpreted-with-passenger – 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