Configuring RubyGems to not install documentation by default

Posted Over 6 years ago. Visible to the public.

When installing gems, a lot of time is spent building locally installed documentation that you probably never use.

We recommend you disable documentation generation for gem install by default.
Note that Bundler won't install documentation Show archive.org snapshot , so this advice applies only when installing gems manually.

If you don't already have it, create a ~/.gemrc file. The gemrc is a Yaml file, so add the following line to add default switches to the gem command.

gem: --no-document

(If you do not know --no-document: it replaces the legacy switches --no-rdoc --no-ri. Its abbreviated version is -N.)

Read the RubyGems command reference Show archive.org snapshot for more information.

Arne Hartherz
Last edit
Over 6 years ago
Henning Koch
License
Source code in this card is licensed under the MIT License.
Posted by Arne Hartherz to makandra dev (2018-01-12 09:49)