tra/spawn — Issue #25: uninitialized class variable @@logger in Spawn (NameError)
Author: jagthedrummer
Created: 2011-11-09 04:34:14+00:00
State: open

After following the directions in the README I'm getting this error when I try to do anything (start a console or server, run rake, etc...):

lib/spawn.rb:42:in `default_options': uninitialized class variable @@logger in Spawn (NameError)

This is my config line in environments/development.rb
Spawn::default_options({ :method => :thread })

This same config was working for me with the older version, but after upgrading to 'edge' I've started to see the error. I think it has something to do with the self.included method that was introduced in this commit:

https://github.com/jagthedrummer/spawn/commit/134a0c92194628b595e4764e3eaccb734ea290b6

I can add "include Spawn" right before that config option and everything works just like it should. But that really shouldn't be needed if Spawn is supposed to function as a gem. Right?

Is there any reason that the creation of the logger and the inclusion of the patches file needs to be wrapped in the self.included function? It seems like it should work just inline. Maybe I'll test that out...

Thanks,
Jeremy