在Rail的黄瓜中键入错误运行功能

我正在尝试为我的Rails应用程序运行Cucumber,并不断收到此错误:

> superclass mismatch for class Point (TypeError)

这个错误有一个巨大的堆栈跟踪,但它不指向任何特定的东西,除了缺少的需求。 这是跟踪:


rake功能(在/ Users / rob / blue / blue_web)/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby -I“/Users/rob/.gem/ruby/1.8/gems/ cucumber-0.3.102 / lib:lib“”/Users/rob/.gem/ruby/1.8/gems/cucumber-0.3.102/bin/cucumber“--color --tags〜@ wip --strict --format漂亮--drb features / manage_logins.feature警告:没有DRb服务器正在运行。 在本地运行功能:类类的超类不匹配(TypeError)/Users/rob/blue/blue_web/app/models/point.rb:1/Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in gem_original_require' /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in polyglot_original_require'/Users gem_original_require' /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in rob gem_original_require' /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in .gem gem_original_require' /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in ruby gem_original_require' /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in 1.8 gem_original_require' /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in gems gem_original_require' /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in polyglot-0.2.9 gem_original_require' /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in lib gem_original_require' /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in polyglot.rb:70:in require' /Users/rob/.gem/ruby/1.8/gems/activesupport-2.3.4/lib/active_support/dependencies.rb:158:in require'/Users/rob/.gem/ruby/1.8/gems/activesupport- 2.3.4 / lib / active_support / dependencies.rb:265:在require_or_load' /Users/rob/.gem/ruby/1.8/gems/activesupport-2.3.4/lib/active_support/dependencies.rb:224:in rob/ require_or_load' /Users/rob/.gem/ruby/1.8/gems/activesupport-2.3.4/lib/active_support/dependencies.rb:224:in ruby/ require_or_load' /Users/rob/.gem/ruby/1.8/gems/activesupport-2.3.4/lib/active_support/dependencies.rb:224:in gems/ require_or_load' /Users/rob/.gem/ruby/1.8/gems/activesupport-2.3.4/lib/active_support/dependencies.rb:224:in -2.3.4/lib/active_support/dependencies.rb: require_or_load' /Users/rob/.gem/ruby/1.8/gems/activesupport-2.3.4/lib/active_support/dependencies.rb:224:in :in depend_on' /Users/rob/.gem/ruby/1.8/gems/activesupport-2.3.4/lib/active_support/dependencies.rb:136:in require_dependency' /Users/rob/.gem/ruby/1.8/gems/rails-2.3.4/lib/initializer.rb:414:in load_application_classes each' /Users/rob/.gem/ruby/1.8/gems/rails-2.3.4/lib/initializer.rb:413:in .gem each' /Users/rob/.gem/ruby/1.8/gems/rails-2.3.4/lib/initializer.rb:413:in ruby each' /Users/rob/.gem/ruby/1.8/gems/rails-2.3.4/lib/initializer.rb:413:in 1.8 each' /Users/rob/.gem/ruby/1.8/gems/rails-2.3.4/lib/initializer.rb:413:in gems each' /Users/rob/.gem/ruby/1.8/gems/rails-2.3.4/lib/initializer.rb:413:in rails-2.3.4 require_dependency' /Users/rob/.gem/ruby/1.8/gems/rails-2.3.4/lib/initializer.rb:414:in 413 require_dependency' /Users/rob/.gem/ruby/1.8/gems/rails-2.3.4/lib/initializer.rb:414:in each' /Users/rob/.gem/ruby/1.8/gems/rails-2.3.4/lib/initializer.rb:413:in tializer.rb each' /Users/rob/.gem/ruby/1.8/gems/rails-2.3.4/lib/initializer.rb:413:in load_application_classes'/Users/ each' /Users/rob/.gem/ruby/1.8/gems/rails-2.3.4/lib/initializer.rb:411:in rails-2.3.4/lib/initializer.rb each' /Users/rob/.gem/ruby/1.8/gems/rails-2.3.4/lib/initializer.rb:413:in 411 each' /Users/rob/.gem/ruby/1.8/gems/rails-2.3.4/lib/initializer.rb:413:in each' /Users/rob/.gem/ruby/1.8/gems/rails-2.3.4/lib/initializer.rb:411:in load_application_classes'/Users each' /Users/rob/.gem/ruby/1.8/gems/rails-2.3.4/lib/initializer.rb:411:in rob each' /Users/rob/.gem/ruby/1.8/gems/rails-2.3.4/lib/initializer.rb:411:in .gem each' /Users/rob/.gem/ruby/1.8/gems/rails-2.3.4/lib/initializer.rb:411:in ruby each' /Users/rob/.gem/ruby/1.8/gems/rails-2.3.4/lib/initializer.rb:411:in 197 each' /Users/rob/.gem/ruby/1.8/gems/rails-2.3.4/lib/initializer.rb:411:in process' /Users/rob/.gem/ruby/1.8/gems/rails-2.3.4/lib/initializer.rb:113:in send'/Users/rob/.gem/ruby/1.8/gems/rails-2.3 .4 / lib / initializer.rb:113:在run' /Users/rob/blue/blue_web/config/environment.rb:16 /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in gem_original_require' /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in polyglot_original_require' /Users/rob/.gem/ruby/1.8/gems/polyglot-0.2.9/lib/polyglot.rb:70:in / polyglot_original_require' /Users/rob/.gem/ruby/1.8/gems/polyglot-0.2.9/lib/polyglot.rb:70:in / polyglot_original_require' /Users/rob/.gem/ruby/1.8/gems/polyglot-0.2.9/lib/polyglot.rb:70:in / polyglot_original_require' /Users/rob/.gem/ruby/1.8/gems/polyglot-0.2.9/lib/polyglot.rb:70:in / polyglot_original_require' /Users/rob/.gem/ruby/1.8/gems/polyglot-0.2.9/lib/polyglot.rb:70:in / polyglot_original_require' /Users/rob/.gem/ruby/1.8/gems/polyglot-0.2.9/lib/polyglot.rb:70:in / polyglot_original_require' /Users/rob/.gem/ruby/1.8/gems/polyglot-0.2.9/lib/polyglot.rb:70:in / polyglot_original_require' /Users/rob/.gem/ruby/1.8/gems/polyglot-0.2.9/lib/polyglot.rb:70:in / polyglot_original_require' /Users/rob/.gem/ruby/1.8/gems/polyglot-0.2.9/lib/polyglot.rb:70:in require './features/support/env.rb:7/Library/Ruby/Gems/1.8/gems/spork-0.7.2/lib/spork.rb:14:in prefork' ./features/support/env.rb:4 /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in features/support/ prefork' ./features/support/env.rb:4 /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in gem_original_require'/Library prefork' ./features/support/env.rb:4 /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in Ruby prefork' ./features/support/env.rb:4 /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in Site prefork' ./features/support/env.rb:4 /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in 1.8 prefork' ./features/support/env.rb:4 /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in rubygems prefork' ./features/support/env.rb:4 /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in custom_require.rb:31:in polyglot_original_require' /Users/rob/.gem/ruby/1.8/gems/polyglot-0.2.9/lib/polyglot.rb:70:in polyglot_original_require' /Users/rob/.gem/ruby/1.8/gems/polyglot-0.2.9/lib/polyglot.rb:70:in require'/Users/rob/.gem/ruby/1.8/gems/cucumber-0.3 .102 / bin /../ lib / cucumber / rb_support / rb_language.rb:107:in load_code_file' /Users/rob/.gem/ruby/1.8/gems/cucumber-0.3.102/bin/../lib/cucumber/rb_support/rb_language.rb:48:in /Users/rob/.gem/ruby/1.8/gems/cucumber-0.3.102/bin/../lib/ load_code_file' /Users/rob/.gem/ruby/1.8/gems/cucumber-0.3.102/bin/../lib/cucumber/rb_support/rb_language.rb:48:in step_definitions_for' load_code_file' /Users/rob/.gem/ruby/1.8/gems/cucumber-0.3.102/bin/../lib/cucumber/rb_support/rb_language.rb:48:in load_code_file' /Users/rob/.gem/ruby/1.8/gems/cucumber-0.3.102/bin/../lib/cucumber/step_mother.rb:82:in load_code_files'/Users/ load_code_file' /Users/rob/.gem/ruby/1.8/gems/cucumber-0.3.102/bin/../lib/cucumber/step_mother.rb:82:in .gem/ruby/1.8 /geos/cucumber-0.3.102/bin/../lib/cucumber/step_mother.rb:81: each' /Users/rob/.gem/ruby/1.8/gems/cucumber-0.3.102/bin/../lib/cucumber/step_mother.rb:81:in load_code_files'/Users/rob/ each' /Users/rob/.gem/ruby/1.8/gems/cucumber-0.3.102/bin/../lib/cucumber/step_mother.rb:81:in ruby/1.8/ each' /Users/rob/.gem/ruby/1.8/gems/cucumber-0.3.102/bin/../lib/cucumber/step_mother.rb:81:in cucumber-0.3.102/ each' /Users/rob/.gem/ruby/1.8/gems/cucumber-0.3.102/bin/../lib/cucumber/step_mother.rb:81:in /../lib/ each' /Users/rob/.gem/ruby/1.8/gems/cucumber-0.3.102/bin/../lib/cucumber/step_mother.rb:81:in cli/main.rb: 46:在execute!' /Users/rob/.gem/ruby/1.8/gems/cucumber-0.3.102/bin/../lib/cucumber/cli/main.rb:24:in execute!' /Users/rob/.gem/ruby/1.8/gems/cucumber-0.3.102/bin/../lib/cucumber/cli/main.rb:24:in execute'/Users/rob/.gem/ruby/ 1.8 /宝石/黄瓜-0.3.102 / bin /黄瓜:9耙中止! 命令失败,状态为(1):[/System/Library/Frameworks/Ruby.framework / ...]


我找到了这个问题的答案,这是一个与mySQL geoSpatial插件和我的模式的类名冲突

我有一个名为Point的课程,一切都很开心。 然后我添加了(非常酷的)geoSpatial插件来使用mySQL的地理索引功能。 这个插件还定义了一个Point类。

冲突导致黄瓜失败。

如果您在自己的应用程序中看到此错误,请查找重复项!

链接地址: http://www.djcxy.com/p/6599.html

上一篇: Type Error running feature in Rail's Cucumber

下一篇: Frequent SystemExit in Ruby when making HTTP calls