7

in a system wide RVM .... heres my /etc/gemrc

---
gem:--no-ri --no-rdoc

heres the system gem env

 GEM PATHS:
     - /usr/lib/ruby/gems/1.9.1
     - /home/${USER}/.gem/ruby/1.9.1
    GEM CONFIGURATION:
         - :update_sources => true
         - :verbose => true
         - :benchmark => false
         - :backtrace => false
         - :bulk_threshold => 1000
         - "gem" => "--no-ri --no-rdoc"

and heres the one in rvm

GEM PATHS:
 - /usr/local/rvm/gems/ruby-1.9.2-p180
 - /usr/local/rvm/gems/ruby-1.9.2-p180@global
GEM CONFIGURATION:
     - :update_sources => true
     - :verbose => true
     - :benchmark => false
     - :backtrace => false
     - :bulk_threshold => 1000

and rvm @global

    GEM PATHS:
     - /usr/local/rvm/gems/ruby-1.9.2-p180
     - /usr/local/rvm/gems/ruby-1.9.2-p180@global
  - GEM CONFIGURATION:
     - :update_sources => true
     - :verbose => true
     - :benchmark => false
     - :backtrace => false
     - :bulk_threshold => 1000

why is it not picking up the gemrc file?

jtzero
  • 171
  • 1
  • 7

5 Answers5

7

Same here. Try this path:

/usr/local/rvm/rubies/ruby-1.9.2-p180/etc/gemrc

To get the path:

$ irb
>> require 'etc'
>> Etc.sysconfdir 
 => "/usr/local/rvm/rubies/ruby-1.9.2-p180/etc" 
1

you need to specify --sysconfdir=/etc for every ruby you compile, you could do that with:

rvm reinstall 1.9.3 -C --sysconfdir=/etc

of course there was a bug in rubygems that caused all 1.8 rubies to use /etc it will be fixed with https://github.com/rubygems/rubygems/pull/291

mpapis
  • 334
  • 3
  • 9
1

Try putting the gemrc file in /usr/local/etc - it should be picked up by all custom compiled rubies.

tee /usr/local/etc/gemrc <<EOF
gem: --no-ri --no-rdoc
EOF
zaius
  • 136
  • 3
1

The reason is that you're supposed to use the name of the command you want to add those arguments to, not gem. For example:

---
install: --no-ri --no-rdoc

Note the install, instead of gem.

phemmer
  • 5,789
  • 2
  • 26
  • 35
0

It seems to be something 1.9.2 related as rvm installed 1.8.7 is picking up the /etc/gemrc file I ended up symlinking ~/.gemrc to /etc/gemrc

Piavlo
  • 131
  • 2
  • 4
  • yeah that's my current work around however I have to do that for each dev-user that is created....I could make it so that every time a user is added to copy the symlink and it will work but I dont like it.... – jtzero Jun 10 '11 at 12:52