rspec安装是否需要安装4个宝石?

时间:2014-08-27 22:07:41

标签: ruby rspec gem

根据本教程:http://rspec.codeschool.com/levels/1(2分钟标记)当您输入“gem install rspec”安装Rspec时,它应该下载4颗宝石。但是我的命令行Windows只安装了1个gem。

Successfully installed rspec-3.0.0
1 gem installed

我是否遗漏了Rspec的其他部分,如果是这样,我该如何手动添加它们?

1 个答案:

答案 0 :(得分:1)

您可能已经安装了所有宝石。我第一次安装rspec时,我安装了6个宝石:

> gem install rspec

Fetching: rspec-support-3.0.4.gem (100%)
Successfully installed rspec-support-3.0.4
Fetching: rspec-core-3.0.4.gem (100%)
Successfully installed rspec-core-3.0.4
Fetching: diff-lcs-1.2.5.gem (100%)
Successfully installed diff-lcs-1.2.5
Fetching: rspec-expectations-3.0.4.gem (100%)
Successfully installed rspec-expectations-3.0.4
Fetching: rspec-mocks-3.0.4.gem (100%)
Successfully installed rspec-mocks-3.0.4
Fetching: rspec-3.0.0.gem (100%)
Successfully installed rspec-3.0.0
6 gems installed

但是一旦安装了所有宝石,再次安装rspec只会显示1个gem:

> gem install rspec

Successfully installed rspec-3.0.0
1 gem installed

要验证安装了哪些gem,请运行:

gem list