Rails 3.1.1 and Cucumber - Error

2019-04-04 00:13发布

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 is installed:

Yanniss-MacBook:rechnungen yannis$ gem list minitest

*** LOCAL GEMS ***

minitest (2.6.1)

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

Thanks a lot, Tom

2条回答
疯言疯语
2楼-- · 2019-04-04 00:25

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

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

Update: The version constraint should no longer be necessary, according to a maintainer:

Technically .. MiniTest is an optional dependency .. It would not normally be an issue .. but the MiniTest shipped with Ruby is well behind the latest version of MiniTest, which Turn needs. Since almost everyone has moved to MiniTest now, I will simply add it as a dependency.

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

查看更多
做自己的国王
3楼-- · 2019-04-04 00:29

I'm new on Ruby on Rails. I had the same problem and what I did to solve this was: - I put in Gemfile the following: gem 'minitest'

Heber

查看更多
登录 后发表回答