本文介绍了Rails 3.1.1和Cucumber - 错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个小问题运行黄瓜。当使用黄瓜时,我得到以下结果:

I have git a little problem running Cucumber. When using cucumber I get the following results:

    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:

Minitest is installed:

Yanniss-MacBook:rechnungen yannis$ gem list minitest

*** LOCAL GEMS ***

minitest (2.6.1)

Google不会返回任何内容...我需要您的帮助...

And Google doesn't return anything... I need your help...

感谢很多,
Tom

Thanks a lot, Tom

推荐答案

在我的 Gemfile 中对应用悲观版本限制

I fixed this by applying a Pessimistic Version Constraint to turn in my Gemfile:

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



更新:版本约束不再需要:

我没有验证上述,现在使用rspec。

I haven't verified the above because I use rspec now.

这篇关于Rails 3.1.1和Cucumber - 错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-21 04:56