Passenger (aka mod_rails) PATH on Leopard 1
Passenger uses a little subset of your PATH.
So if you have installed ruby, gem and misc binaries in other paths you cannot access them via your passenger rails application.
Here comes a solution, create an executable script ruby_with_env, I wrote it in my /usr/local/bin:
#!/bin/bash export PATH="/usr/local/bin:/usr/local/sbin:/usr/local/mysql/bin:/usr/local/graphviz/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/X11/bin:/opt/local/bin:/usr/local/git/bin:/usr/local/git/bin/ :$PATH" /usr/local/bin/ruby $*
Now point the file to your PassengerRuby directive in your apache configuration file and restart.
Trackbacks
Use the following link to trackback from your own site:
http://www.icoretech.org/trackbacks?article_id=passenger-aka-mod_rails-path-on-leopard&day=12&month=07&year=2008
Comments
-
It works, thank you so mutch! Im very appreciate your solution.