Passenger (mod rails) and local gems
- Dalban
- Posts: 2
- Starts: 1
- Wiki Edits: 0
- Location: New York, US
Are mod_rails apps able to use gems installed in ~/.gems? Or would they have to be manually installed by the system administrator?
- Vinayan
- Posts: 244
- Starts: 0
- Wiki Edits: 2
Hi Dalban,
The ruby gems installed for Passenger will be listed by executing the command
/opt/ruby-enterprise-1.8.6-20080810/bin/gem list
The ruby gems which installed on the folder ~/.gems has normally given a gem path of /usr/local/lib/ruby/gems/1.8 but the ruby used by passenger has a got a different gem path /opt/ruby-enterprise-1.8.6-20080810/lib/ruby/gems/1.8. Hence you have to export the path using the command
export GEM_PATH=/opt/ruby-enterprise-1.8.6-20080810/lib/ruby/gems/1.8/:$GEM_HOME to take the ruby gems from the folder ~/.gems.
The ruby gems installed for Passenger will be listed by executing the command
/opt/ruby-enterprise-1.8.6-20080810/bin/gem list
The ruby gems which installed on the folder ~/.gems has normally given a gem path of /usr/local/lib/ruby/gems/1.8 but the ruby used by passenger has a got a different gem path /opt/ruby-enterprise-1.8.6-20080810/lib/ruby/gems/1.8. Hence you have to export the path using the command
export GEM_PATH=/opt/ruby-enterprise-1.8.6-20080810/lib/ruby/gems/1.8/:$GEM_HOME to take the ruby gems from the folder ~/.gems.
2008-09-14 11:49 AM
- Dalban
- Posts: 2
- Starts: 1
- Wiki Edits: 0
- Location: New York, US
Thanks for the response! I searched and could not find it in the forums.
So I just put the following in my ~/.bashrc file?
export GEM_HOME=$HOME/.gems
export GEM_PATH=/opt/ruby-enterprise-1.8.6-20080810/lib/ruby/gems/1.8/:$GEM_HOME
So I just put the following in my ~/.bashrc file?
export GEM_HOME=$HOME/.gems
export GEM_PATH=/opt/ruby-enterprise-1.8.6-20080810/lib/ruby/gems/1.8/:$GEM_HOME
2008-09-14 12:18 PM
- Rahul
- Posts: 498
- Starts: 0
- Wiki Edits: 1
Yup that should do the trick. Do let us know if there are any issues..
2008-09-14 04:32 PM
Regards,Rahul