gems in $HOME
Hi,
I'm new to ruby and rubygems. I installed the debian rubygems package
(from debian testing) and I'm trying to configure it to have gems in my
$HOME dir as this is a shared server.
For this I tried several things:
- setting in environment:
export RUBYOPT=-rubygems
export RUBYLIB=$HOME/.gem_home
export PATH=$HOME/.gem_home/bin:$PATH
export GEM_HOME=$HOME/.gem_home
- same thing except setting gem_home: /home/username/.gem_home in
~/.gemrc instead of environment
- after having read http://docs.rubygems.org/read/chapter/15#page101 I
also tried different path combinations, like:
in ~/.gemrc:
gemhome: /home/username/.gem/lib/ruby/gems/1.8
gempath:
- /home/username/.gem/lib/ruby/gems/1.8
- /var/lib/gems
in environment:
export RUBYOPT=-rubygems
export RUBYLIB=$HOME/.gem/lib/ruby:$HOME/.gem/lib/site-ruby/1.8
export PATH=$HOME/.gem/lib/ruby/gems/1.8/bin
Unfortunately, in all cases, I can't get it to work. For example, I
install a package:
gem install capistrano
Installation seems ok, but when i run the cap command (part of
capistrano) I always get:
$ cap
/usr/lib/ruby/vendor_ruby/1.8/rubygems/dependency.rb:247:in `to_specs':
Could not find capistrano (>= 0) amongst [] (Gem::LoadError)
from /usr/lib/ruby/vendor_ruby/1.8/rubygems/dependency.rb:256:in `to_spec'
from /usr/lib/ruby/vendor_ruby/1.8/rubygems.rb:1208:in `gem'
from /home/mimbert/.gem/lib/ruby/gems/1.8/bin/cap:18
Can someone help me solving this issue? Sorry if I post to the wrong
mailing list, but it seems to me that this would be the best place for
help on this issue.
--
Matthieu Imbert
Reply to: