RVM not picking up /etc/gemrc

Solution 1:

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" 

Solution 2:

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

Solution 3:

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

Solution 4:

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.