spo6bq
Last Updated: February 25, 2016
·
8.306K
· mrako
4fe949ea9ee7c0bc5eb4bf3e17b09d75

Default --no-ri --no-rdoc on Ruby Gem installation

If you want to speed up your gem installations and have less clutter in your system, remove the rdoc and ri when installing new gems.

Usually you would install a new gem like so:

gem install bundler --no-ri --no-rdoc

And if you want to default not having the documentation, add the flags to your global gemrc definition:

echo "gem: --no-ri --no-rdoc" > ~/.gemrc

And to knock it up a notch, you should add .gemrc to your dotfiles.

Here's mine for an example. They're a fork from the better known thoughtbot dotfiles.

Say Thanks
Respond

2 Responses
Add your response

10902
9ed473dbb7dfeac9abc200f40254670c

Hi,
good tip. In what way is this similar to having this on the .gemrc file?

install: --no-rdoc --no-ri
update: --no-rdoc --no-ri

Thanks.

over 1 year ago ·
13753
F555402e879ef6ad937e41bbaedb465b

Careful with '>' as it'll clobber the in place file. Use '>>' for append

over 1 year ago ·