默认情况下,为rubygems 1.8.x禁用rdoc和ri生成 [英] Disable rdoc and ri generation by default for rubygems 1.8.x
问题描述
有很多答案对于在旧版本的rubygems下工作的这个问题,但Rubygems 1.8.x的推荐过程是什么?
gem:--no-rdoc --no-ri
这些选项在任何 gem install
。
更新:
在做了更多的挖掘之后,似乎问题与 rvm
有关,它不仅对各种版本的ruby进行分区,还对其相关的配置文件进行分区。要检查配置文件的位置,请使用 irb
:
require 'rubygems'
Gem :: ConfigFile :: SYSTEM_WIDE_CONFIG_FILE
#=> /opt/local/rvm/rubies/ruby-1.9.2-p180/etc/gemrc
您需要在〜/ .gemrc
或 / etc / gemrc
file
install:--no-rdoc --no-ri
There are a lot of answers for this question that work under older versions of rubygems, but what is the recommended procedure for Rubygems 1.8.x? I have an /etc/gemrc
file that looks like this:
gem: --no-rdoc --no-ri
These options seem to be ignored during any gem install
.
Update:
After doing some more digging, it seems the problem is related to rvm
which partitions not just the various versions of ruby, but their associated configuration files, too. To check where the config file should go, use irb
:
require 'rubygems'
Gem::ConfigFile::SYSTEM_WIDE_CONFIG_FILE
# => "/opt/local/rvm/rubies/ruby-1.9.2-p180/etc/gemrc"
You need to put the following in your ~/.gemrc
or /etc/gemrc
file
install: --no-rdoc --no-ri
这篇关于默认情况下,为rubygems 1.8.x禁用rdoc和ri生成的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!