How to: Stop RubyGems automatically installing documentation

By default, every time you install a gem RubyGems installs all of the documentation that comes with it. In most cases it takes more time to install the documentation than it does to install the gem. For this reason, most rubyists tend to disable this 'feature'.

All you have to do is create the file ~/.gemrc and put this line in it:

gem: --no-ri --no-rdoc

That's it. Next time you install a gem you won't have to sit there waiting for the documentation to be generated. And if you ever do need the docs then do what everybody else does - check online