Read more

Configuring RubyGems to not install documentation by default

Arne Hartherz
January 12, 2018Software engineer at makandra GmbH

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

Illustration online protection

Rails Long Term Support

Rails LTS provides security patches for old versions of Ruby on Rails (2.3, 3.2, 4.2 and 5.2)

  • Prevents you from data breaches and liability risks
  • Upgrade at your own pace
  • Works with modern Rubies
Read more Show archive.org snapshot

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.

Posted by Arne Hartherz to makandra dev (2018-01-12 10:49)