# RubyGems - trouble with .gemrc gempath setting

**URL:** <https://rubytalk.org/t/rubygems-trouble-with-gemrc-gempath-setting/23191>\
**Category:** ruby-talk\
**Created:** [11 December 2005 18:47 UTC](https://rubytalk.org/t/rubygems-trouble-with-gemrc-gempath-setting/23191 "2005-12-11T18:47:38Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Eric\_Landuyt](https://avatars.discourse-cdn.com/v4/letter/e/a698b9/32.png) [@Eric\_Landuyt](https://rubytalk.org/u/Eric_Landuyt)\
**Post date:** [11 December 2005 18:47 UTC](https://rubytalk.org/t/rubygems-trouble-with-gemrc-gempath-setting/23191/1 "2005-12-11T18:47:38Z")

</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)  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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:  
&nbsp;&nbsp;- /home/eric/.gems  
&nbsp;&nbsp;- /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)  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;from /usr/lib/ruby/site\_ruby/1.8/rubygems.rb:141:in `activate'  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;from /usr/lib/ruby/site\_ruby/1.8/rubygems.rb:37:in  
`require\_gem\_with\_options'  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;from /usr/lib/ruby/site\_ruby/1.8/rubygems.rb:31:in `require\_gem'  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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
