Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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?

share|improve this question

5 Answers 5

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" 
share|improve this answer
    
that will sandbox it only to ruby-1.9.2-p180 correct? –  jtzero Jun 10 '11 at 12:47
    
@jtzero correct –  Justin Case Jun 11 '11 at 21:34
    
see the problem with that is I don't want an rdocs on the server, on any version of ruby... –  jtzero Jun 21 '11 at 14:50

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

share|improve this answer

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

share|improve this answer
    
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

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
share|improve this answer

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.