Tom Hoen
2009-Jun-23 09:12 UTC
[rspec-users] any idea why spec_server gets ''cannot remove Object'' error?
I am sure better minds than mine can figure this out, but I am stumped. When I run any spec using spec_server, a get 0 failures and the command prompt returns without issue. If I run the same spec again, I still get 0 failures, but it concludes with the following error: (druby://127.0.0.1:8989) c:/InstantRails-2.0-win/ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:603:in `remove_const'': Cannot remove Object::ClassMethods (NameError) from (druby://127.0.0.1:8989) c:/InstantRails-2.0-win/ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:603:in `remove_constant'' from (druby://127.0.0.1:8989) c:/InstantRails-2.0-win/ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:603:in `instance_eval'' from (druby://127.0.0.1:8989) c:/InstantRails-2.0-win/ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:603:in `remove_constant'' from (druby://127.0.0.1:8989) c:/InstantRails-2.0-win/ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:450:in `remove_unloadable_constants!'' from (druby://127.0.0.1:8989) c:/InstantRails-2.0-win/ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:450:in `each'' from (druby://127.0.0.1:8989) c:/InstantRails-2.0-win/ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:450:in `remove_unloadable_constants!'' from (druby://127.0.0.1:8989) c:/InstantRails-2.0-win/ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:236:in `clear'' from (druby://127.0.0.1:8989) c:/InstantRails-2.0-win/ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/dispatcher.rb:65:in `cleanup_application'' from (druby://127.0.0.1:8989) c:/InstantRails-2.0-win/ruby/lib/ruby/gems/1.8/gems/rspec-rails-1.2.6/lib/spec/rails/spec_server.rb:106:in `run'' from c:/InstantRails-2.0-win/ruby/lib/ruby/gems/1.8/gems/rspec-1.2.6/lib/spec/runner/drb_command_line.rb:14:in `run'' from c:/InstantRails-2.0-win/ruby/lib/ruby/gems/1.8/gems/rspec-1.2.6/lib/spec/runner/option_parser.rb:193:in `parse_drb'' from c:/InstantRails-2.0-win/ruby/lib/ruby/gems/1.8/gems/rspec-1.2.6/lib/spec/runner/option_parser.rb:130:in `order!'' from c:/InstantRails-2.0-win/ruby/lib/ruby/gems/1.8/gems/rspec-1.2.6/lib/spec/runner.rb:51:in `options'' from c:/InstantRails-2.0-win/ruby/lib/ruby/gems/1.8/gems/rspec-1.2.6/lib/spec/runner/command_line.rb:6:in `run'' from c:/InstantRails-2.0-win/ruby/lib/ruby/gems/1.8/gems/rspec-1.2.6/bin/spec:4 from c:/InstantRails-2.0-win/ruby/bin/spec:19:in `load'' from c:/InstantRails-2.0-win/ruby/bin/spec:19 running the spec a third time, most of my tests fail with the following sample error: TypeError in ''School can add staff_members'' can''t dup NilClass If I kill the spec_server, restart it, the cycle begins again. Previously, spec server ran without issue, using individual I am running: rspec and rspec on rails 1.2.6 Rails 2.3.2 ruby 1.8.6 (2007-09-24 patchlevel 111) [i386-mswin32] Windows Vista Any thoughts would be greatly appreciated. Tom -- Posted via http://www.ruby-forum.com/.
David Chelimsky
2009-Jun-23 14:19 UTC
[rspec-users] any idea why spec_server gets ''cannot remove Object'' error?
On Tue, Jun 23, 2009 at 4:12 AM, Tom Hoen<lists at ruby-forum.com> wrote:> I am sure better minds than mine can figure this out, but I am stumped. > > When I run any spec using spec_server, a get 0 failures and the command > prompt returns without issue. > > If I run the same spec again, I still get 0 failures, but it concludes > with the following error: > > (druby://127.0.0.1:8989) > c:/InstantRails-2.0-win/ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:603:in > `remove_const'': Cannot remove Object::ClassMethods (NameError) > ? ? ? ?from (druby://127.0.0.1:8989) > c:/InstantRails-2.0-win/ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:603:in > `remove_constant'' > ? ? ? ?from (druby://127.0.0.1:8989) > c:/InstantRails-2.0-win/ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:603:in > `instance_eval'' > ? ? ? ?from (druby://127.0.0.1:8989) > c:/InstantRails-2.0-win/ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:603:in > `remove_constant'' > ? ? ? ?from (druby://127.0.0.1:8989) > c:/InstantRails-2.0-win/ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:450:in > `remove_unloadable_constants!'' > ? ? ? ?from (druby://127.0.0.1:8989) > c:/InstantRails-2.0-win/ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:450:in > `each'' > ? ? ? ?from (druby://127.0.0.1:8989) > c:/InstantRails-2.0-win/ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:450:in > `remove_unloadable_constants!'' > ? ? ? ?from (druby://127.0.0.1:8989) > c:/InstantRails-2.0-win/ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:236:in > `clear'' > ? ? ? ?from (druby://127.0.0.1:8989) > c:/InstantRails-2.0-win/ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/dispatcher.rb:65:in > `cleanup_application'' > ? ? ? ?from (druby://127.0.0.1:8989) > c:/InstantRails-2.0-win/ruby/lib/ruby/gems/1.8/gems/rspec-rails-1.2.6/lib/spec/rails/spec_server.rb:106:in > `run'' > ? ? ? ?from > c:/InstantRails-2.0-win/ruby/lib/ruby/gems/1.8/gems/rspec-1.2.6/lib/spec/runner/drb_command_line.rb:14:in > `run'' > ? ? ? ?from > c:/InstantRails-2.0-win/ruby/lib/ruby/gems/1.8/gems/rspec-1.2.6/lib/spec/runner/option_parser.rb:193:in > `parse_drb'' > ? ? ? ?from > c:/InstantRails-2.0-win/ruby/lib/ruby/gems/1.8/gems/rspec-1.2.6/lib/spec/runner/option_parser.rb:130:in > `order!'' > ? ? ? ?from > c:/InstantRails-2.0-win/ruby/lib/ruby/gems/1.8/gems/rspec-1.2.6/lib/spec/runner.rb:51:in > `options'' > ? ? ? ?from > c:/InstantRails-2.0-win/ruby/lib/ruby/gems/1.8/gems/rspec-1.2.6/lib/spec/runner/command_line.rb:6:in > `run'' > ? ? ? ?from > c:/InstantRails-2.0-win/ruby/lib/ruby/gems/1.8/gems/rspec-1.2.6/bin/spec:4 > ? ? ? ?from c:/InstantRails-2.0-win/ruby/bin/spec:19:in `load'' > ? ? ? ?from c:/InstantRails-2.0-win/ruby/bin/spec:19 > > > running the spec a third time, most of my tests fail with the following > sample error: > TypeError in ''School can add staff_members'' > can''t dup NilClass > > If I kill the spec_server, restart it, the cycle begins again. > > Previously, spec server ran without issue, using individualPreviously to what? What changed? Also - just a heads up that spec_server is deprecated in 1.2.7 and will be removed in 1.2.8. I prefer to avoid removing things in point releases, but spec_server has been problematic (behaving very differently for a lot of different environments and configurations), and Tim Harper''s new spork gem [1] serves the same purpose in a very elegant way, so the migration path is simple. gem install spork cd path/to/project spork bootstrap --rspec # edit spec/spec_helper.rb You may have better luck if you migrate now. Cheers, David [1] http://github.com/timcharper/spork> > I am running: > rspec and rspec on rails 1.2.6 > Rails 2.3.2 > ruby 1.8.6 (2007-09-24 patchlevel 111) [i386-mswin32] > Windows Vista > > Any thoughts would be greatly appreciated. > > Tom > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users >
Tom Hoen
2009-Jun-23 14:38 UTC
[rspec-users] any idea why spec_server gets ''cannot remove Object'' error?
David - Thank you for responding.> > Previously to what? What changed? >The only changes were some additional models/controllers and specs for both, and I installed and used (in one of the models) open_ssl. My plan it to revert until I find a point at which things start to work again, unless someone has a better idea.> > gem install spork > cd path/to/project > spork bootstrap --rspec > # edit spec/spec_helper.rb >Alas, I develop on Windows. So no spork. As of yet. Thanks for your advice. Tom -- Posted via http://www.ruby-forum.com/.
Tom Hoen
2009-Jun-24 12:58 UTC
[rspec-users] any idea why spec_server gets ''cannot remove Object'' error?
Tom Hoen wrote: In order to suss out what might be cause, i modified the remove_constant method in the LoadingModule class ''\ruby\lib\ruby\gems\1.8\gems\activesupport-2.3.2\lib\active_support\dependencies.rb'', adding in begin/rescue/end statements. def remove_constant(const) #:nodoc: begin return false unless qualified_const_defined? const const = $1 if /\A::(.*)\Z/ =~ const.to_s names = const.to_s.split(''::'') if names.size == 1 # It''s under Object parent = Object else parent = (names[0..-2] * ''::'').constantize end log "removing constant #{const}" parent.instance_eval { remove_const names.last } return true rescue log ''error when removing constant #{const}'' end end This seems to allow the spec_server to operate properly, but I honestly don''t know what repercussions it may cause. -- Posted via http://www.ruby-forum.com/.
Tim Harper
2009-Jun-24 23:06 UTC
[rspec-users] any idea why spec_server gets ''cannot remove Object'' error?
There is no voting love on the windows feature request: http://github.com/timcharper/spork/issues :) On Tue, Jun 23, 2009 at 8:38 AM, Tom Hoen <lists at ruby-forum.com> wrote:> David - Thank you for responding. > > > > > > > Previously to what? What changed? > > > > > The only changes were some additional models/controllers and specs for > both, and I installed and used (in one of the models) open_ssl. My plan > it to revert until I find a point at which things start to work again, > unless someone has a better idea. > > > > > > gem install spork > > cd path/to/project > > spork bootstrap --rspec > > # edit spec/spec_helper.rb > > > > Alas, I develop on Windows. So no spork. As of yet. > > Thanks for your advice. > Tom > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/rspec-users/attachments/20090624/c3176369/attachment.html>
Tom Hoen
2009-Jun-25 11:03 UTC
[rspec-users] any idea why spec_server gets ''cannot remove Object'' error?
Tim Harper wrote:> There is no voting love on the windows feature request: > > http://github.com/timcharper/spork/issues > :)I tried to vote a +1, but get this after clicking the Comment button: There was a problem serving the requested page. Now you''re wondering, "what can I do about it!?!". Well... Have you heard of anyone that has rspec/spork/cucumber etc running under cygwin, colinux, andLinux, or Ulteo Virtual Desktop. Do any of them allow for fork? -- Posted via http://www.ruby-forum.com/.
Tim Harper
2009-Jul-01 18:57 UTC
[rspec-users] any idea why spec_server gets ''cannot remove Object'' error?
Hi, On Thu, Jun 25, 2009 at 5:03 AM, Tom Hoen<lists at ruby-forum.com> wrote:> I tried to vote a +1, but get this after clicking the Comment button: > > ? There was a problem serving the requested page. > > ? Now you''re wondering, "what can I do about it!?!". Well...That''s lame. votes have been coming in on other issues, so I guess that makes you and / or your timing, special :)> > Have you heard of anyone that has rspec/spork/cucumber etc running under > cygwin, colinux, andLinux, or Ulteo Virtual Desktop. Do any of them > allow for fork?yes, yes, yes, don''t know cygwin is slow, I would avoid it. andLinux is a ubuntu-KDE distribution that uses colinux. I use andLinux at home, and it''s simply awesome. Tim
nbenes
2009-Jul-23 16:13 UTC
[rspec-users] any idea why spec_server gets ''cannot remove Object'' error?
Tim Harper wrote:> >> Have you heard of anyone that has rspec/spork/cucumber etc running under >> cygwin, colinux, andLinux, or Ulteo Virtual Desktop. Do any of them >> allow for fork? > > yes, yes, yes, don''t know > > cygwin is slow, I would avoid it. andLinux is a ubuntu-KDE > distribution that uses colinux. I use andLinux at home, and it''s > simply awesome. > > Tim > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users >Hey Tim, I was trying to get Spork to work on Cygwin (Yes...Cygwin is slow, hence the desire to get everything going on a DRb). I installed the Spork gem and setup the files for spec/cucumber just like it said to. However whenever I try to use it with either one it doesn''t work. Spork starts up just fine, but then when I run: script/spec spec --drb It fails out on me. I also tried doing it with autospec (and the proper changes to the spec_helper file), but same result. $ spork Using RSpec Preloading Rails environment Loading Spork.prefork block... Spork is ready and listening on 8989! 3 [main] ruby 5696 C:\cygwin\bin\ruby.exe: *** fatal error - unable to remap C:\cygwin\bin\cyggcrypt-11.dll to same address as parent(0x5390000) !0x54A0000 15 [main] ruby 3344 child_info::sync: wait failed, pid 5696, Win32 error 183 204 [main] ruby 3344 fork: child 5696 - died waiting for dll loading, errno 11 That''s the error I get. The 3 [main] ruby etc. line shows up when I attempt to run my specs through it in another terminal. The next two lines (15 and 204) show up about 5 minutes later if letting it idle. Any idea on what it''s doing or how I can solve this? I have rspec 1.2.8 ruby 1.8.7 rails 2.3.2 Supposedly cygwin will support the forking so something tells me this is another issue entirely. Any ideas? -- View this message in context: http://www.nabble.com/any-idea-why-spec_server-gets-%27cannot-remove-Object%27-error--tp24162534p24629257.html Sent from the rspec-users mailing list archive at Nabble.com.
Tim Harper
2009-Aug-12 04:09 UTC
[rspec-users] any idea why spec_server gets ''cannot remove Object'' error?
On Thu, Jul 23, 2009 at 10:13 AM, nbenes <nathan.benes at gmail.com> wrote:> > > > Tim Harper wrote: > > > >> Have you heard of anyone that has rspec/spork/cucumber etc running under > >> cygwin, colinux, andLinux, or Ulteo Virtual Desktop. Do any of them > >> allow for fork? > > > > yes, yes, yes, don''t know > > > > cygwin is slow, I would avoid it. andLinux is a ubuntu-KDE > > distribution that uses colinux. I use andLinux at home, and it''s > > simply awesome. > > > > Tim > > _______________________________________________ > > rspec-users mailing list > > rspec-users at rubyforge.org > > http://rubyforge.org/mailman/listinfo/rspec-users > > > > Hey Tim, I was trying to get Spork to work on Cygwin (Yes...Cygwin is slow, > hence the desire to get everything going on a DRb). > > I installed the Spork gem and setup the files for spec/cucumber just like > it > said to. However whenever I try to use it with either one it doesn''t work. > Spork starts up just fine, but then when I run: > > script/spec spec --drb > > It fails out on me. I also tried doing it with autospec (and the proper > changes to the spec_helper file), but same result. > > $ spork > Using RSpec > Preloading Rails environment > Loading Spork.prefork block... > Spork is ready and listening on 8989! > 3 [main] ruby 5696 C:\cygwin\bin\ruby.exe: *** fatal error - unable to > remap C:\cygwin\bin\cyggcrypt-11.dll to same address as parent(0x5390000) > !> 0x54A0000 > 15 [main] ruby 3344 child_info::sync: wait failed, pid 5696, Win32 > error 183 > 204 [main] ruby 3344 fork: child 5696 - died waiting for dll loading, > errno 11 > > > That''s the error I get. The 3 [main] ruby etc. line shows up when I > attempt > to run my specs through it in another terminal. The next two lines (15 and > 204) show up about 5 minutes later if letting it idle. Any idea on what > it''s doing or how I can solve this? > > I have rspec 1.2.8 > ruby 1.8.7 > rails 2.3.2 > > Supposedly cygwin will support the forking so something tells me this is > another issue entirely. Any ideas?I''m really sorry. I have no idea why it''s doing that. I set up a friend with AndLinux on his winders machine. He was using the E editor, and then running spork and autospec under AndLinux, using the kde terminal. It was a pretty sweet setup and was fast. You might look into it. Tim -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/rspec-users/attachments/20090811/0741b7d6/attachment.html>