Cucumber 功能失败“未定义的方法‘工厂’”带捆绑器,导轨 2.3.5
rake cucumber --trace
输出:
/usr/bin/ruby1.8 -I "/home/vadim/.bundle/ruby/1.8/gems/cucumber-0.8.3/lib:lib" "/home/vadim/.bundle/ruby/1.8/gems/cucumber-0.8.3/bin/cucumber" --profile default
Using the default profile...
...
Given I signed up with "username/[email protected]/password" # features/step_definitions/clearance_steps.rb:13
undefined method `Factory' for #<Cucumber::Rails::World:0x..fdb6a5bc0> (NoMethodError)
./features/step_definitions/clearance_steps.rb:14:in `/^I signed up with "(.*)\/(.*)\/(.*)"$/'
features/sign_in.feature:14:in `Given I signed up with "username/[email protected]/password"
...
13 scenarios (13 failed)
83 steps (13 failed, 70 skipped)
0m0.769s
rake aborted!
Command failed with status (1): [/usr/bin/ruby1.8 -I "/home/vadim/.bundle/r...]
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:995
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:1010:in `call'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:1010:in `sh'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:1094:in `sh'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:1029:in `ruby'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:1094:in `ruby'
/home/vadim/.bundle/ruby/1.8/gems/cucumber-0.8.3/lib/cucumber/rake/task.rb:68:in `run'
/home/vadim/.bundle/ruby/1.8/gems/cucumber-0.8.3/lib/cucumber/rake/task.rb:138
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:in `call'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:in `execute'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:in `each'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:in `execute'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:597:in `invoke_with_call_chain'
/usr/lib/ruby/1.8/monitor.rb:242:in `synchronize'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:590:in `invoke_with_call_chain'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:607:in `invoke_prerequisites'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:604:in `each'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:604:in `invoke_prerequisites'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:596:in `invoke_with_call_chain'
/usr/lib/ruby/1.8/monitor.rb:242:in `synchronize'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:590:in `invoke_with_call_chain'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:583:in `invoke'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2051:in `invoke_task'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `top_level'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `each'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `top_level'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2023:in `top_level'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2001:in `run'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:1998:in `run'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/bin/rake:31
/usr/bin/rake:19:in `load'
/usr/bin/rake:19
上运行的 Rails 2.3.5
系统:在 Ubuntu 9.04捆绑器 (0.9.26) 红宝石宝石 1.3.7 ruby 1.8.7 (2010-01-10 patchlevel 249) [i486-linux]
Gemfile
source :rubygems
gem "rails", "2.3.5"
gem "mysql"
gem "clearance"
gem "formtastic"
gem "haml"
gem "geokit"
group :development do
gem "mongrel"
end
group :test do
gem "factory_girl"
gem 'rspec', '>=1.3.0'
gem 'rspec-rails', '>=1.3.2'
end
group :cucumber do
gem "factory_girl"
gem 'cucumber-rails', '>=0.3.0'
gem 'database_cleaner', '>=0.5.0'
gem 'webrat', '>=0.7.0'
gem 'rspec', '>=1.3.0'
gem 'rspec-rails', '>=1.3.2'
end
Bundle 安装输出
Using rake (0.8.7) from bundler gems
Using activesupport (2.3.5) from bundler gems
Using rack (1.0.1) from bundler gems
Using actionpack (2.3.5) from bundler gems
Using actionmailer (2.3.5) from bundler gems
Using activerecord (2.3.5) from bundler gems
Using activeresource (2.3.5) from bundler gems
Using builder (2.1.2) from bundler gems
Using cgi_multipart_eof_fix (2.5.0) from bundler gems
Using clearance (0.8.8) from bundler gems
Using diff-lcs (1.1.2) from bundler gems
Using trollop (1.16.2) from bundler gems
Using gherkin (2.0.2) from bundler gems
Using json_pure (1.4.3) from bundler gems
Using term-ansicolor (1.0.5) from bundler gems
Using cucumber (0.8.3) from bundler gems
Using cucumber-rails (0.3.2) from bundler gems
Using daemons (1.1.0) from bundler gems
Using database_cleaner (0.5.2) from bundler gems
Using factory_girl (1.3.1) from bundler gems
Using fastthread (1.0.7) from bundler gems
Using formtastic (0.9.10) from bundler gems
Using gem_plugin (0.2.3) from bundler gems
Using geokit (1.5.0) from bundler gems
Using haml (3.0.13) from bundler gems
Using mongrel (1.1.5) from bundler gems
Using mysql (2.8.1) from bundler gems
Using nokogiri (1.4.2) from bundler gems
Using rack-test (0.5.4) from bundler gems
Using rails (2.3.5) from bundler gems
Using rspec (1.3.0) from bundler gems
Using rspec-rails (1.3.2) from bundler gems
Using webrat (0.7.1) from bundler gems
Your bundle is complete! Use `bundle show [gemname]` to see where a bundled gem is installed.
有什么想法吗?
谢谢!
rake cucumber --trace
output:
/usr/bin/ruby1.8 -I "/home/vadim/.bundle/ruby/1.8/gems/cucumber-0.8.3/lib:lib" "/home/vadim/.bundle/ruby/1.8/gems/cucumber-0.8.3/bin/cucumber" --profile default
Using the default profile...
...
Given I signed up with "username/[email protected]/password" # features/step_definitions/clearance_steps.rb:13
undefined method `Factory' for #<Cucumber::Rails::World:0x..fdb6a5bc0> (NoMethodError)
./features/step_definitions/clearance_steps.rb:14:in `/^I signed up with "(.*)\/(.*)\/(.*)"$/'
features/sign_in.feature:14:in `Given I signed up with "username/[email protected]/password"
...
13 scenarios (13 failed)
83 steps (13 failed, 70 skipped)
0m0.769s
rake aborted!
Command failed with status (1): [/usr/bin/ruby1.8 -I "/home/vadim/.bundle/r...]
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:995
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:1010:in `call'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:1010:in `sh'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:1094:in `sh'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:1029:in `ruby'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:1094:in `ruby'
/home/vadim/.bundle/ruby/1.8/gems/cucumber-0.8.3/lib/cucumber/rake/task.rb:68:in `run'
/home/vadim/.bundle/ruby/1.8/gems/cucumber-0.8.3/lib/cucumber/rake/task.rb:138
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:in `call'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:in `execute'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:in `each'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:in `execute'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:597:in `invoke_with_call_chain'
/usr/lib/ruby/1.8/monitor.rb:242:in `synchronize'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:590:in `invoke_with_call_chain'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:607:in `invoke_prerequisites'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:604:in `each'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:604:in `invoke_prerequisites'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:596:in `invoke_with_call_chain'
/usr/lib/ruby/1.8/monitor.rb:242:in `synchronize'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:590:in `invoke_with_call_chain'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:583:in `invoke'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2051:in `invoke_task'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `top_level'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `each'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `top_level'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2023:in `top_level'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2001:in `run'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:1998:in `run'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/bin/rake:31
/usr/bin/rake:19:in `load'
/usr/bin/rake:19
System: Rails 2.3.5 running on Ubuntu 9.04
bundler (0.9.26)
RubyGems 1.3.7
ruby 1.8.7 (2010-01-10 patchlevel 249) [i486-linux]
Gemfile
source :rubygems
gem "rails", "2.3.5"
gem "mysql"
gem "clearance"
gem "formtastic"
gem "haml"
gem "geokit"
group :development do
gem "mongrel"
end
group :test do
gem "factory_girl"
gem 'rspec', '>=1.3.0'
gem 'rspec-rails', '>=1.3.2'
end
group :cucumber do
gem "factory_girl"
gem 'cucumber-rails', '>=0.3.0'
gem 'database_cleaner', '>=0.5.0'
gem 'webrat', '>=0.7.0'
gem 'rspec', '>=1.3.0'
gem 'rspec-rails', '>=1.3.2'
end
Bundle Install Output
Using rake (0.8.7) from bundler gems
Using activesupport (2.3.5) from bundler gems
Using rack (1.0.1) from bundler gems
Using actionpack (2.3.5) from bundler gems
Using actionmailer (2.3.5) from bundler gems
Using activerecord (2.3.5) from bundler gems
Using activeresource (2.3.5) from bundler gems
Using builder (2.1.2) from bundler gems
Using cgi_multipart_eof_fix (2.5.0) from bundler gems
Using clearance (0.8.8) from bundler gems
Using diff-lcs (1.1.2) from bundler gems
Using trollop (1.16.2) from bundler gems
Using gherkin (2.0.2) from bundler gems
Using json_pure (1.4.3) from bundler gems
Using term-ansicolor (1.0.5) from bundler gems
Using cucumber (0.8.3) from bundler gems
Using cucumber-rails (0.3.2) from bundler gems
Using daemons (1.1.0) from bundler gems
Using database_cleaner (0.5.2) from bundler gems
Using factory_girl (1.3.1) from bundler gems
Using fastthread (1.0.7) from bundler gems
Using formtastic (0.9.10) from bundler gems
Using gem_plugin (0.2.3) from bundler gems
Using geokit (1.5.0) from bundler gems
Using haml (3.0.13) from bundler gems
Using mongrel (1.1.5) from bundler gems
Using mysql (2.8.1) from bundler gems
Using nokogiri (1.4.2) from bundler gems
Using rack-test (0.5.4) from bundler gems
Using rails (2.3.5) from bundler gems
Using rspec (1.3.0) from bundler gems
Using rspec-rails (1.3.2) from bundler gems
Using webrat (0.7.1) from bundler gems
Your bundle is complete! Use `bundle show [gemname]` to see where a bundled gem is installed.
Any ideas?
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这是捆绑器崩溃的一个问题,因为我在多个组中声明了factory_girl。 http://github.com/carlhuda/bundler/issues/issue/135 在将此修复程序合并到版本中之前,请从 github 中拉取捆绑器 gem,或者不要将 Gemfile 中的 gem 放入多个组中。
This is an issue with bundler crapping out because I declared factory_girl in more than one group. http://github.com/carlhuda/bundler/issues/issue/135 Until this fix is incorporated into a release, either pull down the bundler gem from github or don't put a gem in your Gemfile into more than one group.