[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: gems in $HOME



Actually, i messed up my tests, contrary to what I said, the cap command works if I define GEM_HOME in the environment instead of in .gemrc, so forget my mail, and sorry for the noise

On 02/08/2012 09:57 AM, Matthieu Imbert wrote:
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 <matthieu.imbert@ens-lyon.fr>
http://graal.ens-lyon.fr/~mimbert/
INRIA research engineer / SED / GRAAL and RESO teams
http://www.inria.fr http://www.ens-lyon.fr/LIP
+33(0)472728741
LIP ENS-Lyon, 46 allée d'Italie
69364 Lyon cedex 07, FRANCE


Reply to: