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?

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" 
  • 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
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

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
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.

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

  • 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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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