tags:

views:

3648

answers:

5

I don't use RI nor RDOC from the gems I install in my machine or in the servers I handle. (I use other means of documentation) Every gem I install comes whith ri and rdoc by default and I forget to set --no-ri --no-rdoc.

Is there a way to make those 2 flags default?

+2  A: 

You can specify default options using the .gemrc configuration file.

Documentation about gem configuration file

Vincent Robert
+22  A: 

you just add following line to your ~/.gemrc file (It is in your home folder)

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

Update: As comment below said no need to "source"

Jirapong
+3  A: 

You don't need to source .gemrc. It is not a bash profile.

Austin Taylor
+1  A: 

Under Windows XP the path to gemrc file is "c:\Documents and Settings\All Users\Application Data\gemrc". And this file is not created by default, you should create it yourself.

Slava Tysenchuk
Under Windows 7 it's C:\ProgramData\gemrc
Slava Tysenchuk
A: 

First result on Google shows:

# /home/{user}/.gemrc

---
:update_sources: true
:sources:
- http://gems.rubyforge.org/
- http://gems.github.com
:benchmark: false
:bulk_threshold: 1000
:backtrace: false
:verbose: true
gem: --no-ri --no-rdoc

http://webonrails.com/2008/12/03/skiping-installation-of-ri-and-rdoc-documentation-while-installing-gems/

David