rubygems 1.8.x 默认禁用 rdoc 和 ri 生成 [英] Disable rdoc and ri generation by default for rubygems 1.8.x
问题描述
有很多答案 这个问题在旧版本的 rubygems 下工作,但是 Rubygems 1.8.x 的推荐过程是什么?我有一个 /etc/gemrc
文件,如下所示:
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
在任何 gem install
期间,这些选项似乎都被忽略了.
These options seem to be ignored during any gem install
.
更新:
在进行了更多挖掘之后,问题似乎与 rvm
有关,它不仅划分了 ruby 的各个版本,还划分了它们相关的配置文件.要检查配置文件的位置,请使用 irb
:
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"
推荐答案
您需要将以下内容放入您的 ~/.gemrc
或 /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屋!