我在运行Cucumber时遇到了一些麻烦。使用黄瓜时,我得到以下结果:

    Yanniss-MacBook:rechnungen yannis$ cucumber
Using the default profile...
/Users/yannis/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/rack-1.3.4/lib/rack/backports/uri/common_192.rb:53: warning: already initialized constant WFKV_
MiniTest v1.6.0 is out of date.
`gem install minitest` and add `gem 'minitest' to you test helper. (RuntimeError)
/Users/yannis/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/turn-0.8.3/lib/turn/autorun/minitest.rb:14:in `<top (required)>'
/Users/yannis/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:240:in `require'
/Users/yannis/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:240:in `block in require'
/Users/yannis/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:225:in `load_dependency'
/Users/yannis/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:240:in `require'
/Users/yannis/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/turn-0.8.3/lib/turn.rb:13:in `<top (required)>'
/Users/yannis/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:240:in `require'
/Users/yannis/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:240:in `block in require'
/Users/yannis/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:225:in `load_dependency'
/Users/yannis/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:240:in `require'
/Users/yannis/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/railties-3.1.1/lib/rails/test_help.rb:19:in `<top (required)>'
/Users/yannis/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:240:in `require'
/Users/yannis/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:240:in `block in require'
/Users/yannis/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:225:in `load_dependency'
/Users/yannis/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:240:in `require'
/Users/yannis/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/cucumber-rails-1.1.1/lib/cucumber/rails.rb:11:in `<top (required)>'
/Users/yannis/.rbenv/versions/1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:59:in `require'
/Users/yannis/.rbenv/versions/1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:59:in `rescue in require'
/Users/yannis/.rbenv/versions/1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:35:in `require'
/Users/yannis/Sites/rechnungen/features/support/env.rb:7:in `<top (required)>'
/Users/yannis/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/cucumber-1.1.0/lib/cucumber/rb_support/rb_language.rb:143:in `load'
/Users/yannis/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/cucumber-1.1.0/lib/cucumber/rb_support/rb_language.rb:143:in `load_code_file'
/Users/yannis/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/cucumber-1.1.0/lib/cucumber/runtime/support_code.rb:171:in `load_file'
/Users/yannis/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/cucumber-1.1.0/lib/cucumber/runtime/support_code.rb:83:in `block in load_files!'
/Users/yannis/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/cucumber-1.1.0/lib/cucumber/runtime/support_code.rb:82:in `each'
/Users/yannis/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/cucumber-1.1.0/lib/cucumber/runtime/support_code.rb:82:in `load_files!'
/Users/yannis/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/cucumber-1.1.0/lib/cucumber/runtime.rb:137:in `load_step_definitions'
/Users/yannis/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/cucumber-1.1.0/lib/cucumber/runtime.rb:39:in `run!'
/Users/yannis/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/cucumber-1.1.0/lib/cucumber/cli/main.rb:43:in `execute!'
/Users/yannis/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/cucumber-1.1.0/lib/cucumber/cli/main.rb:20:in `execute'
/Users/yannis/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/cucumber-1.1.0/bin/cucumber:14:in `<top (required)>'
/Users/yannis/.rbenv/versions/1.9.2-p290/bin/cucumber:19:in `load'
/Users/yannis/.rbenv/versions/1.9.2-p290/bin/cucumber:19:in `<main>'
Yanniss-MacBook:rechnungen yannis$


Minitest已安装:

Yanniss-MacBook:rechnungen yannis$ gem list minitest

*** LOCAL GEMS ***

minitest (2.6.1)


Google不会退回任何东西...我需要您的帮助...

非常感谢,
汤姆

最佳答案

我通过对turn中的Gemfile应用悲观版本约束来解决此问题:

group :test do
  gem 'turn', '< 0.8.3'
end


更新:根据a maintainer,不再需要版本约束:


从技术上讲.. MiniTest是一个可选的依赖项..通常不会出现问题..但是Ruby附带的MiniTest远远落后于Turn需要的最新版本的MiniTest。由于几乎每个人现在都已转移到MiniTest,因此我将其简单地添加为依赖项。


我尚未验证以上内容,因为现在使用rspec。

关于ruby-on-rails - Rails 3.1.1和Cucumber-错误,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/7719114/

10-13 06:42