如何删除安装的ri和rdoc? [英] How to remove installed ri and rdoc?
本文介绍了如何删除安装的ri和rdoc?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何删除已安装宝石的 ri
和 rdoc
?谢谢
解决方案
您可以简单地移除RubyGems安装中的 doc
目录目录。
rm -r`gem env gemdir` / doc
默认情况下,在Mac OS X上,它是 /Library/Ruby/Gems/1.8/doc
。
请记住,RubyGems可能有多个安装目录。
- RubyGems会尝试如果它无法访问正常的安装目录(比如你安装了一个没有<安装目录的gem文件),那么安装到你的用户目录(如
〜/ .gem / ruby / 1.8 /
code> sudo )。 - RVM还会为其安装的每个Ruby安装RubyGems,它将包含
doc
包含rdoc
和ri
文件(例如〜/ .rvm / gems / ruby-1.9.2-preview1 / doc
)。
这只会删除现有的文件,无论如何,那些将会有新的安装减少使用 - 无文档
标志进行gem install或将其设为默认值。
How can I remove the ri
and rdoc
of installed gems? Thanks
解决方案
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-document
flag for gem install or make it a default.
这篇关于如何删除安装的ri和rdoc?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文