Andrew Zielinski
2009-Apr-07 23:21 UTC
[rspec-users] superclass mismatch for class ModelExampleGroup (TypeError)
I hope somebody can help me with this. I can''t seem to run spec_server with rails 2.3.2 using rspec/rspec-rails 1.2.2. The funny thing is that autospec seems to work fine. I''m also using mocha 0.9.5 and remarkable 2.3.0. Thanks Andrew Here is the stack trace: --------------------------------- /Library/Ruby/Gems/1.8/gems/rspec-rails-1.2.2/lib/spec/rails/example/model_example_group.rb:9: superclass mismatch for class ModelExampleGroup (TypeError) from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in `gem_original_require'' from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in `require'' from /Library/Ruby/Gems/1.8/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:158:in `require'' from /Library/Ruby/Gems/1.8/gems/rspec-rails-1.2.2/lib/spec/rails/example.rb:6 from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in `gem_original_require'' from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in `require'' from /Library/Ruby/Gems/1.8/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:158:in `require'' from /Library/Ruby/Gems/1.8/gems/rspec-rails-1.2.2/lib/spec/rails.rb:19 ... 9 levels... from /Library/Ruby/Gems/1.8/gems/rails-2.3.2/lib/initializer.rb:113:in `run'' from ./script/../config/environment.rb:13 from ./script/spec_server:6:in `require'' from ./script/spec_server:6 -- View this message in context: http://www.nabble.com/superclass-mismatch-for-class-ModelExampleGroup-%28TypeError%29-tp22940271p22940271.html Sent from the rspec-users mailing list archive at Nabble.com.
David Chelimsky
2009-Apr-08 01:17 UTC
[rspec-users] superclass mismatch for class ModelExampleGroup (TypeError)
On Tue, Apr 7, 2009 at 6:20 PM, Andrew Zielinski <andrew.zielinski.is at gmail.com> wrote:> > I hope somebody can help me with this. > > I can''t seem to run spec_server with rails 2.3.2 using rspec/rspec-rails > 1.2.2. I''m also using mocha 0.9.5 and remarkable 2.3.0.The stack trace doesn''t show it, but the superclass mismatch suggests that you have a version of rspec pre 1.2 that is being loaded somewhere. The old ModelExampleGroup derived directly from Test::Unit::TestCase, but the 1.2 class derives from ActiveSupport::TestCase. Can you check to see what versions of rspec and rspec-rails you have installed and uninstall all the old ones if you can. HTH, David> > Thanks Andrew > > Here is the stack trace: > > --------------------------------- > > /Library/Ruby/Gems/1.8/gems/rspec-rails-1.2.2/lib/spec/rails/example/model_example_group.rb:9: > superclass mismatch for class ModelExampleGroup (TypeError) > > from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in > `gem_original_require'' > from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in `require'' > from > /Library/Ruby/Gems/1.8/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:158:in > `require'' > from > /Library/Ruby/Gems/1.8/gems/rspec-rails-1.2.2/lib/spec/rails/example.rb:6 > from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in > `gem_original_require'' > from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in `require'' > from > /Library/Ruby/Gems/1.8/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:158:in > `require'' > from /Library/Ruby/Gems/1.8/gems/rspec-rails-1.2.2/lib/spec/rails.rb:19 > ?... 9 levels... > from /Library/Ruby/Gems/1.8/gems/rails-2.3.2/lib/initializer.rb:113:in `run'' > from ./script/../config/environment.rb:13 > from ./script/spec_server:6:in `require'' > from ./script/spec_server:6 > > > -- > View this message in context: http://www.nabble.com/superclass-mismatch-for-class-ModelExampleGroup-%28TypeError%29-tp22940271p22940271.html > Sent from the rspec-users mailing list archive at Nabble.com. > > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users >
Andrew Zielinski
2009-Apr-08 20:48 UTC
[rspec-users] superclass mismatch for class ModelExampleGroup (TypeError)
Thanks David, It seems like remarkable was the culprit. Somebody had posted the same issue to lighthouse. The solution was to specify the lib in environment.rb instead of setting it to false for rspec and rspec-rails. The discussion was in Portuguese so I''m not sure why this works. I don''t get the error anymore but now when I run spec_server it hangs. Running it with debug produced the following output: -----------Exception `LoadError'' at /Library/Ruby/Site/1.8/rubygems.rb:871 - no such file to load -- rubygems/defaults/operating_system Exception `LoadError'' at /Library/Ruby/Site/1.8/rubygems/config_file.rb:35 - no such file to load -- Win32API Exception `TypeError'' at (eval):4 - can''t modify frozen object Exception `MissingSourceFile'' at /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31 - no such file to load -- fast_xs Exception `Gem::LoadError'' at /Library/Ruby/Site/1.8/rubygems.rb:636 - RubyGem version error: rack(0.3.0 not ~> 1.0.0) Exception `Gem::LoadError'' at /Library/Ruby/Site/1.8/rubygems.rb:636 - Could not find RubyGem tmail (~> 1.2.3) Exception `MissingSourceFile'' at /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31 - no such file to load -- tmail/tmailscanner Exception `MissingSourceFile'' at /Library/Ruby/Site/1.8/rubygems/custom_require.rb:38 - no such file to load -- tmail/tmailscanner Exception `MissingSourceFile'' at /Library/Ruby/Gems/1.8/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:162 - no such file to load -- tmail/tmailscanner /Library/Ruby/Gems/1.8/gems/rails-2.3.2/lib/initializer.rb:756: warning: instance variable @reload_plugins not initialized /Library/Ruby/Gems/1.8/gems/rails-2.3.2/lib/initializer.rb:756: warning: instance variable @reload_plugins not initialized /Library/Ruby/Gems/1.8/gems/rails-2.3.2/lib/initializer.rb:756: warning: instance variable @reload_plugins not initialized /Library/Ruby/Gems/1.8/gems/rails-2.3.2/lib/initializer.rb:756: warning: instance variable @reload_plugins not initialized ................... David Chelimsky-2 wrote:> > On Tue, Apr 7, 2009 at 6:20 PM, Andrew Zielinski > <andrew.zielinski.is at gmail.com> wrote: >> >> I hope somebody can help me with this. >> >> I can''t seem to run spec_server with rails 2.3.2 using rspec/rspec-rails >> 1.2.2. I''m also using mocha 0.9.5 and remarkable 2.3.0. > > The stack trace doesn''t show it, but the superclass mismatch suggests > that you have a version of rspec pre 1.2 that is being loaded > somewhere. The old ModelExampleGroup derived directly from > Test::Unit::TestCase, but the 1.2 class derives from > ActiveSupport::TestCase. Can you check to see what versions of rspec > and rspec-rails you have installed and uninstall all the old ones if > you can. > > HTH, > David > >> >> Thanks Andrew >> >> Here is the stack trace: >> >> --------------------------------- >> >> /Library/Ruby/Gems/1.8/gems/rspec-rails-1.2.2/lib/spec/rails/example/model_example_group.rb:9: >> superclass mismatch for class ModelExampleGroup (TypeError) >> >> from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in >> `gem_original_require'' >> from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in `require'' >> from >> /Library/Ruby/Gems/1.8/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:158:in >> `require'' >> from >> /Library/Ruby/Gems/1.8/gems/rspec-rails-1.2.2/lib/spec/rails/example.rb:6 >> from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in >> `gem_original_require'' >> from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in `require'' >> from >> /Library/Ruby/Gems/1.8/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:158:in >> `require'' >> from /Library/Ruby/Gems/1.8/gems/rspec-rails-1.2.2/lib/spec/rails.rb:19 >> ?... 9 levels... >> from /Library/Ruby/Gems/1.8/gems/rails-2.3.2/lib/initializer.rb:113:in >> `run'' >> from ./script/../config/environment.rb:13 >> from ./script/spec_server:6:in `require'' >> from ./script/spec_server:6 >> >> >> -- >> View this message in context: >> http://www.nabble.com/superclass-mismatch-for-class-ModelExampleGroup-%28TypeError%29-tp22940271p22940271.html >> Sent from the rspec-users mailing list archive at Nabble.com. >> >> _______________________________________________ >> rspec-users mailing list >> rspec-users at rubyforge.org >> http://rubyforge.org/mailman/listinfo/rspec-users >> > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users > >-- View this message in context: http://www.nabble.com/superclass-mismatch-for-class-ModelExampleGroup-%28TypeError%29-tp22940271p22959248.html Sent from the rspec-users mailing list archive at Nabble.com.
David Chelimsky
2009-Apr-10 08:12 UTC
[rspec-users] superclass mismatch for class ModelExampleGroup (TypeError)
On Wed, Apr 8, 2009 at 5:48 PM, Andrew Zielinski <andrew.zielinski.is at gmail.com> wrote:> > Thanks David, > > It seems like remarkable was the culprit. Somebody had posted the same issue > to lighthouse.Do you mean rspec''s lighthouse account? If so, which ticket?> The solution was to specify the lib in environment.rb instead of setting it > to false for rspec and rspec-rails. The discussion was in Portuguese so I''m > not sure why this works. > > I don''t get the error anymore but now when I run spec_server it hangs. > Running it with debug produced the following output: > > -----------Exception `LoadError'' at /Library/Ruby/Site/1.8/rubygems.rb:871 - > no such file to load -- rubygems/defaults/operating_system > Exception `LoadError'' at /Library/Ruby/Site/1.8/rubygems/config_file.rb:35 - > no such file to load -- Win32APIWin32API??? No idea why that is being loaded (or trying to be).> Exception `TypeError'' at (eval):4 - can''t modify frozen object > Exception `MissingSourceFile'' at > /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31 - no such file to load > -- fast_xs > Exception `Gem::LoadError'' at /Library/Ruby/Site/1.8/rubygems.rb:636 - > RubyGem version error: rack(0.3.0 not ~> 1.0.0) > > Exception `Gem::LoadError'' at /Library/Ruby/Site/1.8/rubygems.rb:636 - Could > not find RubyGem tmail (~> 1.2.3) > > Exception `MissingSourceFile'' at > /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31 - no such file to load > -- tmail/tmailscanner > Exception `MissingSourceFile'' at > /Library/Ruby/Site/1.8/rubygems/custom_require.rb:38 - no such file to load > -- tmail/tmailscanner > Exception `MissingSourceFile'' at > /Library/Ruby/Gems/1.8/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:162 > - no such file to load -- tmail/tmailscanner > /Library/Ruby/Gems/1.8/gems/rails-2.3.2/lib/initializer.rb:756: warning: > instance variable @reload_plugins not initialized > /Library/Ruby/Gems/1.8/gems/rails-2.3.2/lib/initializer.rb:756: warning: > instance variable @reload_plugins not initialized > /Library/Ruby/Gems/1.8/gems/rails-2.3.2/lib/initializer.rb:756: warning: > instance variable @reload_plugins not initialized > /Library/Ruby/Gems/1.8/gems/rails-2.3.2/lib/initializer.rb:756: warning: > instance variable @reload_plugins not initializedThere''s not that much help in this backtrace (for me). Anybody else paying attention and getting some idea about this problem?> > ................... > > > > David Chelimsky-2 wrote: >> >> On Tue, Apr 7, 2009 at 6:20 PM, Andrew Zielinski >> <andrew.zielinski.is at gmail.com> wrote: >>> >>> I hope somebody can help me with this. >>> >>> I can''t seem to run spec_server with rails 2.3.2 using rspec/rspec-rails >>> 1.2.2. I''m also using mocha 0.9.5 and remarkable 2.3.0. >> >> The stack trace doesn''t show it, but the superclass mismatch suggests >> that you have a version of rspec pre 1.2 that is being loaded >> somewhere. The old ModelExampleGroup derived directly from >> Test::Unit::TestCase, but the 1.2 class derives from >> ActiveSupport::TestCase. Can you check to see what versions of rspec >> and rspec-rails you have installed and uninstall all the old ones if >> you can. >> >> HTH, >> David >> >>> >>> Thanks Andrew >>> >>> Here is the stack trace: >>> >>> --------------------------------- >>> >>> /Library/Ruby/Gems/1.8/gems/rspec-rails-1.2.2/lib/spec/rails/example/model_example_group.rb:9: >>> superclass mismatch for class ModelExampleGroup (TypeError) >>> >>> from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in >>> `gem_original_require'' >>> from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in `require'' >>> from >>> /Library/Ruby/Gems/1.8/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:158:in >>> `require'' >>> from >>> /Library/Ruby/Gems/1.8/gems/rspec-rails-1.2.2/lib/spec/rails/example.rb:6 >>> from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in >>> `gem_original_require'' >>> from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in `require'' >>> from >>> /Library/Ruby/Gems/1.8/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:158:in >>> `require'' >>> from /Library/Ruby/Gems/1.8/gems/rspec-rails-1.2.2/lib/spec/rails.rb:19 >>> ?... 9 levels... >>> from /Library/Ruby/Gems/1.8/gems/rails-2.3.2/lib/initializer.rb:113:in >>> `run'' >>> from ./script/../config/environment.rb:13 >>> from ./script/spec_server:6:in `require'' >>> from ./script/spec_server:6 >>> >>> >>> -- >>> View this message in context: >>> http://www.nabble.com/superclass-mismatch-for-class-ModelExampleGroup-%28TypeError%29-tp22940271p22940271.html >>> Sent from the rspec-users mailing list archive at Nabble.com. >>> >>> _______________________________________________ >>> rspec-users mailing list >>> rspec-users at rubyforge.org >>> http://rubyforge.org/mailman/listinfo/rspec-users >>> >> _______________________________________________ >> rspec-users mailing list >> rspec-users at rubyforge.org >> http://rubyforge.org/mailman/listinfo/rspec-users >> >> > > -- > View this message in context: http://www.nabble.com/superclass-mismatch-for-class-ModelExampleGroup-%28TypeError%29-tp22940271p22959248.html > Sent from the rspec-users mailing list archive at Nabble.com. > > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users
Andrew Zielinski
2009-Apr-11 13:01 UTC
[rspec-users] superclass mismatch for class ModelExampleGroup (TypeError)
It was on remarkable''s lighthouse account. David Chelimsky-2 wrote:> > On Wed, Apr 8, 2009 at 5:48 PM, Andrew Zielinski > <andrew.zielinski.is at gmail.com> wrote: >> >> Thanks David, >> >> It seems like remarkable was the culprit. Somebody had posted the same >> issue >> to lighthouse. > > Do you mean rspec''s lighthouse account? If so, which ticket? > >> The solution was to specify the lib in environment.rb instead of setting >> it >> to false for rspec and rspec-rails. The discussion was in Portuguese so >> I''m >> not sure why this works. >> >> I don''t get the error anymore but now when I run spec_server it hangs. >> Running it with debug produced the following output: >> >> -----------Exception `LoadError'' at >> /Library/Ruby/Site/1.8/rubygems.rb:871 - >> no such file to load -- rubygems/defaults/operating_system >> Exception `LoadError'' at >> /Library/Ruby/Site/1.8/rubygems/config_file.rb:35 - >> no such file to load -- Win32API > > Win32API??? No idea why that is being loaded (or trying to be). > >> Exception `TypeError'' at (eval):4 - can''t modify frozen object >> Exception `MissingSourceFile'' at >> /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31 - no such file to >> load >> -- fast_xs >> Exception `Gem::LoadError'' at /Library/Ruby/Site/1.8/rubygems.rb:636 - >> RubyGem version error: rack(0.3.0 not ~> 1.0.0) >> >> Exception `Gem::LoadError'' at /Library/Ruby/Site/1.8/rubygems.rb:636 - >> Could >> not find RubyGem tmail (~> 1.2.3) >> >> Exception `MissingSourceFile'' at >> /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31 - no such file to >> load >> -- tmail/tmailscanner >> Exception `MissingSourceFile'' at >> /Library/Ruby/Site/1.8/rubygems/custom_require.rb:38 - no such file to >> load >> -- tmail/tmailscanner >> Exception `MissingSourceFile'' at >> /Library/Ruby/Gems/1.8/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:162 >> - no such file to load -- tmail/tmailscanner >> /Library/Ruby/Gems/1.8/gems/rails-2.3.2/lib/initializer.rb:756: warning: >> instance variable @reload_plugins not initialized >> /Library/Ruby/Gems/1.8/gems/rails-2.3.2/lib/initializer.rb:756: warning: >> instance variable @reload_plugins not initialized >> /Library/Ruby/Gems/1.8/gems/rails-2.3.2/lib/initializer.rb:756: warning: >> instance variable @reload_plugins not initialized >> /Library/Ruby/Gems/1.8/gems/rails-2.3.2/lib/initializer.rb:756: warning: >> instance variable @reload_plugins not initialized > > There''s not that much help in this backtrace (for me). Anybody else > paying attention and getting some idea about this problem? > >> >> ................... >> >> >> >> David Chelimsky-2 wrote: >>> >>> On Tue, Apr 7, 2009 at 6:20 PM, Andrew Zielinski >>> <andrew.zielinski.is at gmail.com> wrote: >>>> >>>> I hope somebody can help me with this. >>>> >>>> I can''t seem to run spec_server with rails 2.3.2 using >>>> rspec/rspec-rails >>>> 1.2.2. I''m also using mocha 0.9.5 and remarkable 2.3.0. >>> >>> The stack trace doesn''t show it, but the superclass mismatch suggests >>> that you have a version of rspec pre 1.2 that is being loaded >>> somewhere. The old ModelExampleGroup derived directly from >>> Test::Unit::TestCase, but the 1.2 class derives from >>> ActiveSupport::TestCase. Can you check to see what versions of rspec >>> and rspec-rails you have installed and uninstall all the old ones if >>> you can. >>> >>> HTH, >>> David >>> >>>> >>>> Thanks Andrew >>>> >>>> Here is the stack trace: >>>> >>>> --------------------------------- >>>> >>>> /Library/Ruby/Gems/1.8/gems/rspec-rails-1.2.2/lib/spec/rails/example/model_example_group.rb:9: >>>> superclass mismatch for class ModelExampleGroup (TypeError) >>>> >>>> from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in >>>> `gem_original_require'' >>>> from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in `require'' >>>> from >>>> /Library/Ruby/Gems/1.8/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:158:in >>>> `require'' >>>> from >>>> /Library/Ruby/Gems/1.8/gems/rspec-rails-1.2.2/lib/spec/rails/example.rb:6 >>>> from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in >>>> `gem_original_require'' >>>> from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in `require'' >>>> from >>>> /Library/Ruby/Gems/1.8/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:158:in >>>> `require'' >>>> from /Library/Ruby/Gems/1.8/gems/rspec-rails-1.2.2/lib/spec/rails.rb:19 >>>> ?... 9 levels... >>>> from /Library/Ruby/Gems/1.8/gems/rails-2.3.2/lib/initializer.rb:113:in >>>> `run'' >>>> from ./script/../config/environment.rb:13 >>>> from ./script/spec_server:6:in `require'' >>>> from ./script/spec_server:6 >>>> >>>> >>>> -- >>>> View this message in context: >>>> http://www.nabble.com/superclass-mismatch-for-class-ModelExampleGroup-%28TypeError%29-tp22940271p22940271.html >>>> Sent from the rspec-users mailing list archive at Nabble.com. >>>> >>>> _______________________________________________ >>>> rspec-users mailing list >>>> rspec-users at rubyforge.org >>>> http://rubyforge.org/mailman/listinfo/rspec-users >>>> >>> _______________________________________________ >>> rspec-users mailing list >>> rspec-users at rubyforge.org >>> http://rubyforge.org/mailman/listinfo/rspec-users >>> >>> >> >> -- >> View this message in context: >> http://www.nabble.com/superclass-mismatch-for-class-ModelExampleGroup-%28TypeError%29-tp22940271p22959248.html >> Sent from the rspec-users mailing list archive at Nabble.com. >> >> _______________________________________________ >> rspec-users mailing list >> rspec-users at rubyforge.org >> http://rubyforge.org/mailman/listinfo/rspec-users > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users > >-- View this message in context: http://www.nabble.com/superclass-mismatch-for-class-ModelExampleGroup-%28TypeError%29-tp22940271p23000951.html Sent from the rspec-users mailing list archive at Nabble.com.