RubyGems - trouble with .gemrc gempath setting

Hi guys,

I’m having a strange error with RubyGems when specifying a repository in
a
subdir of my home directory (RubyGems itself was installed globally).

First, here is my .bashrc:
export RUBYOPT=rubygems
(no GEM_* variables defined).

I run the following (for example to install ruvi, but the same error is
occuring with others packages, like rake, …):

eric@localhost ~ $ gem install ruvi
Attempting local installation of ‘ruvi’
Local gem file not found: ruvi*.gem
Attempting remote installation of ‘ruvi’
Updating Gem source index for: http://gems.rubyforge.org
ERROR: While executing gem … (Errno::EACCES)
Permission denied - /usr/lib/ruby/gems/1.8/cache/ruvi-0.4.12.gem

Ok. Seems quite logical, I don’t have rw access to the global
repository.
So, I created ~/.gemrc as follow:

gemhome: /home/eric/.gems
gempath:

  • /home/eric/.gems
  • /usr/lib/ruby/gems/1.8
    gem: --gen-rdoc --run-tests

Now, retrying:

eric@localhost ~ $ gem install ruvi
Attempting local installation of ‘ruvi’
Local gem file not found: ruvi*.gem
Attempting remote installation of ‘ruvi’
Updating Gem source index for: http://gems.rubyforge.org
Successfully installed ruvi-0.4.12

Ok, it was installed succesfully (‘gemhome’ setting used). But:

eric@localhost ~ $ ruvi
/usr/lib/ruby/site_ruby/1.8/rubygems.rb:204:in report_activate_error': Could not find RubyGem ruvi (> 0) (Gem::LoadError) from /usr/lib/ruby/site_ruby/1.8/rubygems.rb:141:in activate’
from /usr/lib/ruby/site_ruby/1.8/rubygems.rb:37:in
require_gem_with_options' from /usr/lib/ruby/site_ruby/1.8/rubygems.rb:31:in require_gem’
from /home/eric/.gems/bin/ruvi:17

It seems ‘gempath’ is not properly used. Finally, if I try:

export GEM_PATH=/home/eric/.gems

then ruvi is working properly!
So, any idea why this is not working with the ‘gempath’ as specified in
my
…gemrc ?

Thank you in advance,

Eric Landuyt