It is always frustrating to install a gem and wait 2 seconds for the gem to install and then wait 30 seconds for the docs, which I never use(Google, anyone?). Why do we force this convention upon ourselves when the local docs normally aren't even beneficial?
I know you can use gem install rails --no-ri --no-rdoc to skip that step but is there a way to simply skip the docs by default?
Add the flags to your ~/.gemrc file.
From the docs:
gemlooks for a configuration file.gemrcin your home directory, although you can specify another file on the command-line if you wish (with the--config-file modifier). Only one configuration file will be processed: the rightmost one on the command-line, or the default$HOME/.gemrc, or none at all.There are three things you can specify in the configuration file:
- command-line arguments to be used every time
gemruns- command-line options for "RDoc" (used when generating documentation)
GEMPATHsettingsThe config file itself is in "YAML" format. Here is an example:
gem: --local --gen-rdoc --run-tests rdoc: --inline-source --line-numbers gempath: - /usr/local/rubygems - /home/gavin/.rubygemsThe effects of such a config file would be:
gemonly runs "local" operations (unless you specify--remoteor--bothon the command-line)gemgenerates RDocs and runs unit tests every time it installs something (good idea!)- when it generates RDocs, the given arguments will be used
/usr/local/rubygemsand/home/gavin/rubygemswill be used as your$GEM_PATHsetting