Ruby-on-rails 将 --no-rdoc 和 --no-ri 与捆绑程序一起使用

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/7535737/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-03 02:01:43  来源:igfitidea点击:

Using --no-rdoc and --no-ri with bundler

ruby-on-railsrubyrubygemsgembundler

提问by deb

When using gem install gem_nameI can pass --no-rdocand --no-riswitches to skip generating RDoc/RI documentation for the gem on install.

使用时,gem install gem_name我可以通过--no-rdoc--no-ri切换到跳过为安装时的 gem 生成 RDoc/RI 文档。

Is there a similar way to do this with bundle install?

有没有类似的方法来做到这一点bundle install

回答by Timbinous

Bundler doesn't include rdoc and ri. There is nothing you need to do.

Bundler 不包括 rdoc 和 ri。您无需执行任何操作。

回答by Mitch Dempsey

Make a file ~/.gemrcand put this in it:

制作一个文件~/.gemrc并将其放入其中:

gem: --no-rdoc --no-ri

gem: --no-rdoc --no-ri

That should make it apply whenever you run the gemcommand. (Even from bundle install)

这应该使它在您运行gem命令时应用。(甚至从bundle install

回答by David J.

See https://stackoverflow.com/a/7662245/109618for a better ~/.gemrc:

请参阅https://stackoverflow.com/a/7662245/109618以获得更好的效果~/.gemrc

install: --no-rdoc --no-ri 
update:  --no-rdoc --no-ri

回答by thisismydesign

The up-to-date setting for ~/.gemrcis

的最新设置~/.gemrc

gem: --no-document

But as pointed out, this is already bundler's default.

但正如所指出的,这已经bundler是默认值。