DEV Community

Tao Liu
Tao Liu

Posted on

Make your ruby gems install faster

"--no-ri --no-rdoc"
How to make --no-ri --no-rdoc the default for gem install?

To make the --no-ri and --no-rdoc options the default for the gem install command, you can configure this behavior in your Gem configuration file or by setting environment variables. Here's how to do it:

Option 1: Using the Gem Configuration File (Recommended)

Open your Gem configuration file. The location of the file depends on your operating system:

On Unix-based systems (Linux, macOS), it's typically located at ~/.gemrc.
On Windows, it might be located at %USERPROFILE%.gemrc or C:\Ruby{version}\etc\gemrc.
If the file doesn't exist, you can create it.

Add the following lines to the Gem configuration file:


install: --no-ri --no-rdoc
This sets the default options for gem install to include --no-ri and --no-rdoc.

Save the Gem configuration file.

Top comments (0)

Sentry image

See why 4M developers consider Sentry, “not bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay