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 web development

Do you need DevOps-experts?

Your development team has a full backlog? No time for infrastructure architecture? Our DevOps team is ready to support you!

  • We build reliable cloud solutions with Infrastructure as code
  • We are experts in security, Linux and databases
  • We support your dev team to perform
Read more Show snapshot

We recommend you disable documentation generation for gem install by default.
Note that Bundler won't install documentation Show 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 snapshot for more information.

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