How can I remove the ri
and rdoc
of installed gems? Thanks
views:
290answers:
1
+4
A:
You can simply remove the doc
directory in the RubyGems installation directory.
rm -r `gem env gemdir`/doc
On Mac OS X by default, it's /Library/Ruby/Gems/1.8/doc
.
Keep in mind that there might be several installation directories for RubyGems.
- RubyGems will try to install to your user directory (something like
~/.gem/ruby/1.8/
) if it can't access the normal installation directory (e.g. you installed a gem withoutsudo
). - RVM also installs RubyGems for each Ruby it installs which will contain a
doc
directory containingrdoc
andri
files (e.g.~/.rvm/gems/ruby-1.9.2-preview1/doc
).
This will merely remove existing files, but new ones will come with new installations anyway, unless you use the --no-ri --no-rdoc
flags for gem install or make them default.
BiHi
2010-05-31 14:12:36