# RubyGems - trouble with .gemrc gempath setting

**URL:** <https://www.ruby-forum.com/t/rubygems-trouble-with-gemrc-gempath-setting/49995>\
**Category:** Ruby\
**Created:** [December 11, 2005, 7:47pm UTC](https://www.ruby-forum.com/t/rubygems-trouble-with-gemrc-gempath-setting/49995 "2005-12-11T19:47:55Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Eric\_Landuyt](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/a698b9/32.png) [@Eric\_Landuyt](https://www.ruby-forum.com/u/Eric_Landuyt)\
**Post date:** [December 11, 2005, 7:47pm UTC](https://www.ruby-forum.com/t/rubygems-trouble-with-gemrc-gempath-setting/49995/1 "2005-12-11T19:47:55Z")

</div>

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](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](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
