默认情况下,为rubygems 1.8.x禁用rdoc和ri生成 [英] Disable rdoc and ri generation by default for rubygems 1.8.x

查看:104
本文介绍了默认情况下,为rubygems 1.8.x禁用rdoc和ri生成的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有很多答案对于在旧版本的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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆