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.
Written by Marko Klemetti
Related protips
2 Responses
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
·
Careful with '>' as it'll clobber the in place file. Use '>>' for append
over 1 year ago
·
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Ruby
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#