Andy Pearson
2009-Jul-24 21:33 UTC
[rspec-users] Errors when running AUTOFEATURE=true autospec [cucumber, autotest]
Hey List, Hope all is well, I haven''t been keeping up with the list whilst I wasn''t doing much Rails work but I''m back in the game and looking forward to seeing how far things have progressed! I think I have probably mentioned this already on the list, but just to reiterate: I am a beginner! I have installed the new Rspec and Cucumber for use with Rails, and did what needed to be done to update libxml2 for use with nokogiri and updated to the latest ZenTest but I am still seeing the following stack trace when running `AUTOFEATURE=true autospec` Warning: $KCODE is NONE. /Library/Ruby/Gems/1.8/gems/cucumber-0.3.90/lib/cucumber/ step_definition.rb:100: warning: method redefined; discarding old regexp /Library/Ruby/Gems/1.8/gems/treetop-1.3.0/lib/treetop/ruby_extensions/ string.rb:31: warning: method redefined; discarding old indent /Library/Ruby/Gems/1.8/gems/treetop-1.3.0/lib/treetop/compiler/ node_classes/character_class.rb:13: warning: useless use of a literal in void context /Library/Ruby/Gems/1.8/gems/treetop-1.3.0/lib/treetop/compiler.rb:5: warning: global variable `$exclude_metagrammar'' not initialized /Library/Ruby/Gems/1.8/gems/treetop-1.3.0/lib/treetop/compiler/ metagrammar.rb:232: warning: method redefined; discarding old space /Library/Ruby/Gems/1.8/gems/treetop-1.3.0/lib/treetop/compiler/ metagrammar.rb:388: warning: method redefined; discarding old space /Library/Ruby/Gems/1.8/gems/treetop-1.3.0/lib/treetop/compiler/ metagrammar.rb:771: warning: method redefined; discarding old space /Library/Ruby/Gems/1.8/gems/treetop-1.3.0/lib/treetop/compiler/ metagrammar.rb:779: warning: method redefined; discarding old space /Library/Ruby/Gems/1.8/gems/cucumber-0.3.90/lib/cucumber/parser/ feature.rb:28: warning: method redefined; discarding old white /Library/Ruby/Gems/1.8/gems/cucumber-0.3.90/lib/cucumber/parser/ feature.rb:36: warning: method redefined; discarding old white /Library/Ruby/Gems/1.8/gems/cucumber-0.3.90/lib/cucumber/parser/ feature.rb:679: warning: method redefined; discarding old white /Library/Ruby/Gems/1.8/gems/cucumber-0.3.90/lib/cucumber/parser/ feature.rb:687: warning: method redefined; discarding old white /Library/Ruby/Gems/1.8/gems/cucumber-0.3.90/lib/cucumber/parser/ feature.rb:813: warning: method redefined; discarding old white /Library/Ruby/Gems/1.8/gems/cucumber-0.3.90/lib/cucumber/parser/ feature.rb:825: warning: method redefined; discarding old white /Library/Ruby/Gems/1.8/gems/activesupport-2.3.3/lib/active_support/ core_ext/blank.rb:49: warning: method redefined; discarding old blank? Is this something to be concerned about? The feature examples still seem to run but I''m not sure whether I will get problems down the line. Thanks for any help you can offer, Andy
Andy Pearson
2009-Jul-25 11:57 UTC
[rspec-users] Errors when running AUTOFEATURE=true autospec [cucumber, autotest]
Wanted to add some more information to this.... Since Cucumber seemed to be working, I created a feature and used it to drive the initial creation of a new controller. Once the route was done I dropped down to a controller spec and wrote the controller code that makes it pass. Now when I run AUTOFEATURE=true autospec it dies with the following stack trace: Warning: $KCODE is NONE. /Library/Ruby/Gems/1.8/gems/cucumber-0.3.90/lib/cucumber/ step_definition.rb:100: warning: method redefined; discarding old regexp /Library/Ruby/Gems/1.8/gems/treetop-1.3.0/lib/treetop/ruby_extensions/ string.rb:31: warning: method redefined; discarding old indent /Library/Ruby/Gems/1.8/gems/treetop-1.3.0/lib/treetop/compiler/ node_classes/character_class.rb:13: warning: useless use of a literal in void context /Library/Ruby/Gems/1.8/gems/treetop-1.3.0/lib/treetop/compiler.rb:5: warning: global variable `$exclude_metagrammar'' not initialized /Library/Ruby/Gems/1.8/gems/treetop-1.3.0/lib/treetop/compiler/ metagrammar.rb:232: warning: method redefined; discarding old space /Library/Ruby/Gems/1.8/gems/treetop-1.3.0/lib/treetop/compiler/ metagrammar.rb:388: warning: method redefined; discarding old space /Library/Ruby/Gems/1.8/gems/treetop-1.3.0/lib/treetop/compiler/ metagrammar.rb:771: warning: method redefined; discarding old space /Library/Ruby/Gems/1.8/gems/treetop-1.3.0/lib/treetop/compiler/ metagrammar.rb:779: warning: method redefined; discarding old space /Library/Ruby/Gems/1.8/gems/cucumber-0.3.90/lib/cucumber/parser/ feature.rb:28: warning: method redefined; discarding old white /Library/Ruby/Gems/1.8/gems/cucumber-0.3.90/lib/cucumber/parser/ feature.rb:36: warning: method redefined; discarding old white /Library/Ruby/Gems/1.8/gems/cucumber-0.3.90/lib/cucumber/parser/ feature.rb:679: warning: method redefined; discarding old white /Library/Ruby/Gems/1.8/gems/cucumber-0.3.90/lib/cucumber/parser/ feature.rb:687: warning: method redefined; discarding old white /Library/Ruby/Gems/1.8/gems/cucumber-0.3.90/lib/cucumber/parser/ feature.rb:813: warning: method redefined; discarding old white /Library/Ruby/Gems/1.8/gems/cucumber-0.3.90/lib/cucumber/parser/ feature.rb:825: warning: method redefined; discarding old white /Library/Ruby/Gems/1.8/gems/activesupport-2.3.3/lib/active_support/ core_ext/blank.rb:49: warning: method redefined; discarding old blank? /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby / Users/andypearson/.gem/ruby/1.8/gems/rspec-1.1.12/bin/spec spec/ controllers/lifestream_controller_spec.rb -O spec/spec.opts /Library/Ruby/Gems/1.8/gems/rspec-1.2.8/lib/spec/autorun.rb:3: undefined method `autorun'' for Spec::Runner:Module (NoMethodError) 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.3/lib/ active_support/dependencies.rb:158:in `require'' from ./spec/controllers/../spec_helper.rb:5 from ./spec/controllers/lifestream_controller_spec.rb:1:in `require'' from ./spec/controllers/lifestream_controller_spec.rb:1 from /Users/andypearson/.gem/ruby/1.8/gems/rspec-1.1.12/lib/spec/ runner/example_group_runner.rb:15:in `load'' from /Users/andypearson/.gem/ruby/1.8/gems/rspec-1.1.12/lib/spec/ runner/example_group_runner.rb:15:in `load_files'' from /Users/andypearson/.gem/ruby/1.8/gems/rspec-1.1.12/lib/spec/ runner/example_group_runner.rb:14:in `each'' from /Users/andypearson/.gem/ruby/1.8/gems/rspec-1.1.12/lib/spec/ runner/example_group_runner.rb:14:in `load_files'' from /Users/andypearson/.gem/ruby/1.8/gems/rspec-1.1.12/lib/spec/ runner/options.rb:94:in `run_examples'' from /Users/andypearson/.gem/ruby/1.8/gems/rspec-1.1.12/lib/spec/ runner/command_line.rb:9:in `run'' from /Users/andypearson/.gem/ruby/1.8/gems/rspec-1.1.12/bin/spec:4 Odd thing is, rake spec gets me what I want: ... Finished in 0.071358 seconds 3 examples, 0 failures Based on this, my assumption is this is something to do with ZenTest, have I got an incompatible set of gems? I tried to pull out the most relevant ones: aslakhellesoy-webrat (0.3.2.1) autotest-rails (4.1.0) cucumber (0.3.90, 0.1.16, 0.1.15) nokogiri (1.3.2, 1.1.0) rails (2.3.3, 2.2.2, 2.2.0, 2.1.2, 2.1.1, 2.1.0, 2.0.991, 2.0.2, 2.0.1, 1.2.6, 1.2.3) rspec (1.2.8, 1.1.12, 1.1.11) rspec-rails (1.2.7.1, 1.1.12, 1.1.11) treetop (1.3.0, 1.2.4) webrat (0.4.4, 0.4.0, 0.3.4, 0.2.0) ZenTest (4.1.3, 3.11.0, 3.10.0, 3.9.3, 3.9.2, 3.8.0, 3.6.1) Really hoping I can get some help with this, hitting a block like this gets super frustrating, particularly what I am trying to "do the right thing" by getting this up and running to I can BDD and hopefully write better software! Thanks again in advance, Andy
David Chelimsky
2009-Jul-25 12:28 UTC
[rspec-users] Errors when running AUTOFEATURE=true autospec [cucumber, autotest]
On Jul 24, 2009, at 4:33 PM, Andy Pearson <andy.james.pearson at googlemail.com > wrote:> Hey List, > > Hope all is well, I haven''t been keeping up with the list whilst I > wasn''t doing much Rails work but I''m back in the game and looking > forward to seeing how far things have progressed! > > I think I have probably mentioned this already on the list, but just > to reiterate: I am a beginner! > > I have installed the new Rspec and Cucumber for use with Rails, and > did what needed to be done to update libxml2 for use with nokogiri > and updated to the latest ZenTest but I am still seeing the > following stack trace when running `AUTOFEATURE=true autospec` > Warning: $KCODE is NONE.I have no idea about this one offhand.> /Library/Ruby/Gems/1.8/gems/cucumber-0.3.90/lib/cucumber/ > step_definition.rb:100: warning: method redefined; discarding old > regexp > /Library/Ruby/Gems/1.8/gems/treetop-1.3.0/lib/treetop/ > ruby_extensions/string.rb:31: warning: method redefined; discarding > old indent > /Library/Ruby/Gems/1.8/gems/treetop-1.3.0/lib/treetop/compiler/ > node_classes/character_class.rb:13: warning: useless use of a > literal in void context > /Library/Ruby/Gems/1.8/gems/treetop-1.3.0/lib/treetop/compiler.rb:5: > warning: global variable `$exclude_metagrammar'' not initialized > /Library/Ruby/Gems/1.8/gems/treetop-1.3.0/lib/treetop/compiler/ > metagrammar.rb:232: warning: method redefined; discarding old space > /Library/Ruby/Gems/1.8/gems/treetop-1.3.0/lib/treetop/compiler/ > metagrammar.rb:388: warning: method redefined; discarding old space > /Library/Ruby/Gems/1.8/gems/treetop-1.3.0/lib/treetop/compiler/ > metagrammar.rb:771: warning: method redefined; discarding old space > /Library/Ruby/Gems/1.8/gems/treetop-1.3.0/lib/treetop/compiler/ > metagrammar.rb:779: warning: method redefined; discarding old space > /Library/Ruby/Gems/1.8/gems/cucumber-0.3.90/lib/cucumber/parser/ > feature.rb:28: warning: method redefined; discarding old white > /Library/Ruby/Gems/1.8/gems/cucumber-0.3.90/lib/cucumber/parser/ > feature.rb:36: warning: method redefined; discarding old white > /Library/Ruby/Gems/1.8/gems/cucumber-0.3.90/lib/cucumber/parser/ > feature.rb:679: warning: method redefined; discarding old white > /Library/Ruby/Gems/1.8/gems/cucumber-0.3.90/lib/cucumber/parser/ > feature.rb:687: warning: method redefined; discarding old white > /Library/Ruby/Gems/1.8/gems/cucumber-0.3.90/lib/cucumber/parser/ > feature.rb:813: warning: method redefined; discarding old white > /Library/Ruby/Gems/1.8/gems/cucumber-0.3.90/lib/cucumber/parser/ > feature.rb:825: warning: method redefined; discarding old white > /Library/Ruby/Gems/1.8/gems/activesupport-2.3.3/lib/active_support/ > core_ext/blank.rb:49: warning: method redefined; discarding old blank? >The rest of these suggest that the same code is getting loaded twice, which could be due to using load instead of require or require statements that use relative paths instead of using expand_path or relying on the load path.> Is this something to be concerned about? The feature examples still > seem to run but I''m not sure whether I will get problems down the > line. > > Thanks for any help you can offer,I''d also run this by the cucumber group at http://groups.google.com/group/cukes . Cheers, David> > Andy > > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users
David Chelimsky
2009-Jul-25 13:02 UTC
[rspec-users] Errors when running AUTOFEATURE=true autospec [cucumber, autotest]
On Sat, Jul 25, 2009 at 6:57 AM, Andy Pearson<andy.james.pearson at googlemail.com> wrote:> Wanted to add some more information to this.... > > Since Cucumber seemed to be working, I created a feature and used it > to drive the initial creation of a new controller. > > Once the route was done I dropped down to a controller spec and wrote > the controller code that makes it pass. > > Now when I run AUTOFEATURE=true autospec it dies with the following > stack trace: > > Warning: $KCODE is NONE. > /Library/Ruby/Gems/1.8/gems/cucumber-0.3.90/lib/cucumber/ > step_definition.rb:100: warning: method redefined; discarding old > regexp > /Library/Ruby/Gems/1.8/gems/treetop-1.3.0/lib/treetop/ruby_extensions/ > string.rb:31: warning: method redefined; discarding old indent > /Library/Ruby/Gems/1.8/gems/treetop-1.3.0/lib/treetop/compiler/ > node_classes/character_class.rb:13: warning: useless use of a literal > in void context > /Library/Ruby/Gems/1.8/gems/treetop-1.3.0/lib/treetop/compiler.rb:5: > warning: global variable `$exclude_metagrammar'' not initialized > /Library/Ruby/Gems/1.8/gems/treetop-1.3.0/lib/treetop/compiler/ > metagrammar.rb:232: warning: method redefined; discarding old space > /Library/Ruby/Gems/1.8/gems/treetop-1.3.0/lib/treetop/compiler/ > metagrammar.rb:388: warning: method redefined; discarding old space > /Library/Ruby/Gems/1.8/gems/treetop-1.3.0/lib/treetop/compiler/ > metagrammar.rb:771: warning: method redefined; discarding old space > /Library/Ruby/Gems/1.8/gems/treetop-1.3.0/lib/treetop/compiler/ > metagrammar.rb:779: warning: method redefined; discarding old space > /Library/Ruby/Gems/1.8/gems/cucumber-0.3.90/lib/cucumber/parser/ > feature.rb:28: warning: method redefined; discarding old white > /Library/Ruby/Gems/1.8/gems/cucumber-0.3.90/lib/cucumber/parser/ > feature.rb:36: warning: method redefined; discarding old white > /Library/Ruby/Gems/1.8/gems/cucumber-0.3.90/lib/cucumber/parser/ > feature.rb:679: warning: method redefined; discarding old white > /Library/Ruby/Gems/1.8/gems/cucumber-0.3.90/lib/cucumber/parser/ > feature.rb:687: warning: method redefined; discarding old white > /Library/Ruby/Gems/1.8/gems/cucumber-0.3.90/lib/cucumber/parser/ > feature.rb:813: warning: method redefined; discarding old white > /Library/Ruby/Gems/1.8/gems/cucumber-0.3.90/lib/cucumber/parser/ > feature.rb:825: warning: method redefined; discarding old white > /Library/Ruby/Gems/1.8/gems/activesupport-2.3.3/lib/active_support/ > core_ext/blank.rb:49: warning: method redefined; discarding old blank? > /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby / > Users/andypearson/.gem/ruby/1.8/gems/rspec-1.1.12/bin/spec spec/ > controllers/lifestream_controller_spec.rb -O spec/spec.opts > /Library/Ruby/Gems/1.8/gems/rspec-1.2.8/lib/spec/autorun.rb:3: > undefined method `autorun'' for Spec::Runner:Module (NoMethodError) > ? ? ? ?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.3/lib/ > active_support/dependencies.rb:158:in `require'' > ? ? ? ?from ./spec/controllers/../spec_helper.rb:5 > ? ? ? ?from ./spec/controllers/lifestream_controller_spec.rb:1:in `require'' > ? ? ? ?from ./spec/controllers/lifestream_controller_spec.rb:1 > ? ? ? ?from /Users/andypearson/.gem/ruby/1.8/gems/rspec-1.1.12/lib/spec/ > runner/example_group_runner.rb:15:in `load'' > ? ? ? ?from /Users/andypearson/.gem/ruby/1.8/gems/rspec-1.1.12/lib/spec/ > runner/example_group_runner.rb:15:in `load_files'' > ? ? ? ?from /Users/andypearson/.gem/ruby/1.8/gems/rspec-1.1.12/lib/spec/ > runner/example_group_runner.rb:14:in `each'' > ? ? ? ?from /Users/andypearson/.gem/ruby/1.8/gems/rspec-1.1.12/lib/spec/ > runner/example_group_runner.rb:14:in `load_files'' > ? ? ? ?from /Users/andypearson/.gem/ruby/1.8/gems/rspec-1.1.12/lib/spec/ > runner/options.rb:94:in `run_examples'' > ? ? ? ?from /Users/andypearson/.gem/ruby/1.8/gems/rspec-1.1.12/lib/spec/ > runner/command_line.rb:9:in `run'' > ? ? ? ?from /Users/andypearson/.gem/ruby/1.8/gems/rspec-1.1.12/bin/spec:4Looks like two versions of rspec are getting loaded: /Library/Ruby/Gems/1.8/gems/rspec-1.2.8 /Users/andypearson/.gem/ruby/1.8/gems/rspec-1.1.12 Do you need rspec-1.1.12 for some reason? I''m not sure why it''s getting loaded, but I''m quite confident it won''t get loaded if it''s not there :)> > Odd thing is, rake spec gets me what I want:That''s because the spec task is only loading one version of rspec. If you can find what''s requiring rspec-1.1.12 you''ll find the culprit.> > ... > Finished in 0.071358 seconds > 3 examples, 0 failures > > Based on this, my assumption is this is something to do with ZenTest, > have I got an incompatible set of gems? > > I tried to pull out the most relevant ones: > > aslakhellesoy-webrat (0.3.2.1) > autotest-rails (4.1.0) > cucumber (0.3.90, 0.1.16, 0.1.15) > nokogiri (1.3.2, 1.1.0) > rails (2.3.3, 2.2.2, 2.2.0, 2.1.2, 2.1.1, 2.1.0, 2.0.991, 2.0.2, > 2.0.1, 1.2.6, 1.2.3) > rspec (1.2.8, 1.1.12, 1.1.11) > rspec-rails (1.2.7.1, 1.1.12, 1.1.11) > treetop (1.3.0, 1.2.4) > webrat (0.4.4, 0.4.0, 0.3.4, 0.2.0) > ZenTest (4.1.3, 3.11.0, 3.10.0, 3.9.3, 3.9.2, 3.8.0, 3.6.1) > > Really hoping I can get some help with this, hitting a block like this > gets super frustrating, particularly what I am trying to "do the right > thing" by getting this up and running to I can BDD and hopefully write > better software! > > Thanks again in advance, > > Andy > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users >
Andy Pearson
2009-Jul-28 21:09 UTC
[rspec-users] Errors when running AUTOFEATURE=true autospec [cucumber, autotest]
Hey David,> Looks like two versions of rspec are getting loaded: > > /Library/Ruby/Gems/1.8/gems/rspec-1.2.8 > /Users/andypearson/.gem/ruby/1.8/gems/rspec-1.1.12 > > Do you need rspec-1.1.12 for some reason? I''m not sure why it''s > getting loaded, but I''m quite confident it won''t get loaded if it''s > not there :)Yup, that seemed to be the problem, I removed respec-1.1.12 from my home directory (I''m guessing I tried to install rspec without `sudo` at some point) and now my specs are running fine. Still having the problem with cucumber but I will post on that list and see if anyone there can help me, sorry to clutter up this list - last time I was here there was a discussion to see whether the lists should be split or not, looks like you all came to a decision :) Thanks for your time, Andy