[Backgroundrb-devel] uninitialized constants in worker class

Ezra Zygmuntowicz ezmobius at gmail.com
Mon Aug 7 13:29:57 EDT 2006


	Yeah Michael is correct. Thats something I really need to fix. The  
next release will have a load_activerecord option that will do the  
same as the current load_rails and the load_rails will actually load  
all of rails. Its definitely inconsistent the way it is now.

-Ezra


On Aug 7, 2006, at 8:26 AM, Michael Siebert wrote:

> Welcome Marc!
>
> this error is because load_rails does in fact NOT load rails, but  
> your AR models. to load Rails, just include your (is it boot.rb or  
> environment.rb?). for that, see the environment rake task, that  
> does nothing else. you'll notice that AR logging now goes into your  
> (development|production|test).log
>
>
> 2006/8/7, Marc Beyerlin <marc.beyerlin at combots.com>:
> I am new to this list and relatively new to the backgroundrb  
> plugin,. So
> first i will say hello to everybody here, especially to Ezra
> Zygmuntowicz!
>
> I played a little bit with a dummy worker and so far everything worked
> well.
> But now i want to do real work in a worker but now i get that error 
> [1].
> It looks like that the constants configured in environment* configs  
> are
> not available to the worker class. My configuration looks like that 
> [2].
>
> Maybe someone can give me a hint to solve this problem.
>
> Greetz,
> Marc Beyerlin
>
>
>
> [1] backgroundrb.log:
> uninitialized constant SYSTEM_AMS_AVAILABLE - (NameError)
> ./script/backgroundrb/../../config/../vendor/rails/activerecord/ 
> lib/../.
> ./activesupport/lib/active_support/dependencies.rb:123:in
> `const_missing'
> ./script/backgroundrb/../../config/../components/ams_import.rb:56:in
> `get_published_ams_ids'
> ./script/backgroundrb/../../config/../lib/workers/warehouse.rb:8:in
> `do_work'
> ./script/backgroundrb/../../config/../vendor/plugins/backgroundrb/ 
> backgr
> oundrb.rb:45:in `start_process'
> ./script/backgroundrb/../../config/../vendor/plugins/backgroundrb/ 
> backgr
> oundrb.rb:41:in `start_process'
> ./script/backgroundrb/../../config/../vendor/plugins/backgroundrb/ 
> backgr
> oundrb.rb:112:in `new_worker'
> C:/Programme/ruby/lib/ruby/1.8/thread.rb:135:in `synchronize'
> ./script/backgroundrb/../../config/../vendor/plugins/backgroundrb/ 
> backgr
> oundrb.rb:104:in `new_worker'
> C:/Programme/ruby/lib/ruby/1.8/drb/drb.rb:1552:in
> `perform_without_block'
> C:/Programme/ruby/lib/ruby/1.8/drb/drb.rb:1512:in `perform'
> C:/Programme/ruby/lib/ruby/1.8/drb/drb.rb:1586:in `main_loop'
> C:/Programme/ruby/lib/ruby/1.8/drb/drb.rb:1582:in `main_loop'
> C:/Programme/ruby/lib/ruby/1.8/drb/drb.rb:1578:in `main_loop'
> C:/Programme/ruby/lib/ruby/1.8/drb/drb.rb:1427:in `run'
> C:/Programme/ruby/lib/ruby/1.8/drb/drb.rb:1424:in `run'
> C:/Programme/ruby/lib/ruby/1.8/drb/drb.rb:1344:in `initialize'
> C:/Programme/ruby/lib/ruby/1.8/drb/drb.rb:1624:in `start_service'
> script/backgroundrb/start:84
>
>
> [2] background.yml
> port: "22222"
> timer_sleep: 60
> load_rails: true
> environment: development
> host: localhost
> database_yml: config/database.yml
> acl:
>   deny: all
>   allow: localhost 127.0.0.1
>   order: deny,allow
>
> _______________________________________________
> Backgroundrb-devel mailing list
> Backgroundrb-devel at rubyforge.org
> http://rubyforge.org/mailman/listinfo/backgroundrb-devel
>
>
>
> -- 
> Michael Siebert <info at siebert-wd.de>
>
> www.stellar-legends.de - Weltraum-Browsergame im Alpha-Stadium
> _______________________________________________
> Backgroundrb-devel mailing list
> Backgroundrb-devel at rubyforge.org
> http://rubyforge.org/mailman/listinfo/backgroundrb-devel

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/backgroundrb-devel/attachments/20060807/73218d87/attachment.html 


More information about the Backgroundrb-devel mailing list