之前使用 --no-ri
和 --no-rdoc
将我的系统设置为禁止安装 gem 文档。
Ruby 2.0.0 和 gem 2.0.0 似乎已经删除了 --no-ri
标志(和功能?)。
即使指定--no-rdoc
,我仍然得到安装文档
:
~/dev/ruby> gem install bundler --no-rdoc
Fetching: bundler-1.3.1.gem (100%)
Successfully installed bundler-1.3.1
Done installing documentation for bundler (0 sec).
如何查看文档是否安装?如果已安装,如何抑制所有 gem 安装?
最佳答案
正如 gem help install
所述:
Usage: gem install GEMNAME [GEMNAME ...] [options] -- --build-flags [options] ... Install/Update Options: ... --[no-]document [TYPES] Generate documentation for installed gems List the documentation types you wish to generate. For example: rdoc,ri -N, --no-document Disable documentation generation
简而言之:
--no-rdoc
现在是--no-document rdoc
--no-ri
现在是--no-document ri
。您可以使用
--no-document
或-N
来阻止两者安装。
(不幸的是,在撰写本文时,documentation on Rubygems.org 目前已过时,因此暂时忽略它。)
关于ruby - 如何防止使用 gem v. 2.0 自动安装 gems 文档,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15190859/