使用 Ruby,“gem install” 是否使用“--include-dependencies”...只是文档有点过时了?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/3014183/
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-02 22:45:17  来源:igfitidea点击:

With Ruby, does "gem install" use "--include-dependencies"... just the doc is a little outdated?

ruby-on-railsrubyrubygems

提问by nonopolarity

Using Ruby on Rails, if I do a

使用 Ruby on Rails,如果我做

gem help install

a part of it says:

它的一部分说:

-y, --include-dependencies       Unconditionally install the required
                                 dependent gems

[...]

Defaults:
  --both --version '>= 0' --rdoc --ri --no-force
  --no-test --install-dir c:/ruby/lib/ruby/gems/1.8

but if I do a

但如果我做一个

gem install --include-dependencies mysql

a line says:

一行说:

INFO:  `gem install -y` is now default and will be removed
INFO:  use --ignore-dependencies to install only the gems you list

so looks like gem installalways use --include-dependenciesnow? Just the docs of gem help installis a little outdated?

所以看起来gem install总是使用--include-dependencies现在?只是文档gem help install有点过时了?

I am using the most recent gem:

我正在使用最新的 gem:

C:\>gem -v
1.3.7

C:\>gem update --system
Updating RubyGems
Nothing to update

C:\>

回答by Slobodan Kovacevic

Yes, the documentation is a bit outdated.

是的,文档有点过时了。

gem install --include-dependencies option has been default for some time now.

gem install --include-dependencies 选项已经默认了一段时间了。

回答by Milan

The command is now -include-dependencies, not --include-dependenciesI have used it this way:

命令是 now -include-dependencies,而不是--include-dependencies我这样使用它:

I have tried to install compass 0.12.3 dependencies and I have done it with this command, but this installed only dependencies not compass with them

我试图安装指南针 0.12.3 依赖项,我已经用这个命令完成了,但这只是安装了依赖项,而不是指南针

gem install compass -v 0.12.3 -include-dependencies