【发布时间】:2009-12-02 23:23:16
【问题描述】:
我有一个使用 Cucumber 和 RSpec 的 Rails 应用程序。我们将 gem 存储在 vendor/gems 下,并尝试在 CI 服务器中构建应用程序(运行测试)。
当我尝试运行我们的测试时,我收到以下错误:
Missing these required gems:
cucumber >= 0.3.11
rspec-rails >= 1.2.6
当我运行 RAILS_ENV=test rake gems 时,我得到以下信息:
- [F] activerecord-oracle-adapter
- [R] activerecord >= 1.15.5.7843
- [F] thoughtbot-factory_girl = 1.2.0
- [F] cucumber >= 0.3.11
- [ ] term-ansicolor >= 1.0.3
- [ ] treetop >= 1.2.6
- [ ] diff-lcs >= 1.1.2
- [I] builder >= 2.1.2
- [F] webrat >= 0.4.4
- [I] nokogiri >= 1.2.0
- [F] rspec >= 1.2.6
- [F] rspec-rails >= 1.2.6
- [F] rspec >= 1.2.7
- [ ] rack >= 0.4.0
- [F] thoughtbot-shoulda >= 2.10.2
I = Installed
F = Frozen
R = Framework (loaded before rails starts)
空白的 [ ] 是否意味着宝石丢失?
config/environments/test.rb 包含以下内容:
config.gem "cucumber", :lib => false, :version => ">=0.3.11" unless File.direct
ory?(File.join(Rails.root, 'vendor/plugins/cucumber'))
config.gem "webrat", :lib => false, :version => ">=0.4.4" unless File.direct
ory?(File.join(Rails.root, 'vendor/plugins/webrat'))
config.gem "rspec", :lib => false, :version => ">=1.2.6" unless File.direct
ory?(File.join(Rails.root, 'vendor/plugins/rspec'))
config.gem "rspec-rails", :lib => "spec/rails", :version => ">=1.2.6" unless File.direct
ory?(File.join(Rails.root, 'vendor/plugins/rspec-rails'))
config.gem "thoughtbot-shoulda", :lib => false, :version => ">=2.10.2" unless File.direct
ory?(File.join(Rails.root, 'vendor/plugins/shoulda'))
所以一切看起来都井然有序,但它仍然拒绝运行。
我是否遗漏了一些明显的东西?
【问题讨论】:
-
[] 表示它丢失了。我没有把它作为答案,因为我找不到任何错误。它有时已经对我有所帮助,我决定安装 gem。我会密切关注答案;-)
-
*它有时已经发生在我身上了..
标签: ruby-on-rails rubygems rspec cucumber