Dumb problem using BackgroundRb

i’m trying to use BackgroundRb but when I do worker =
MiddleMan(:tag_sending_worker) in my controller i get "undefined method
`MiddleMan’ for #SchedulesController:0x25be080 , but when i do it from
the console it works fine.

Of course i tried restarting my mongrel and restarting the backgroundrb
process but no luck , any ideas o this ? It iis a weird problem , I
don’t know why it does the lookup in my Controller class only :frowning:

Thanks a lot in advance

hi,

the invocation in your controller should go
Middleman.worker(:my_worker).my_method(:arguments)
see documentation: http://backgroundrb.rubyforge.org/

btw I’m not using backgroundrb anymore, i got fed up with unclear
error messages and relative instability. I’m now using workling-
starling for any new projects.

Elise

On Jan 8, 3:22 pm, Federico B. <rails-mailing-l…@andreas-

On Thu, Jan 8, 2009 at 7:52 PM, Federico B.
[email protected] wrote:

i’m trying to use BackgroundRb but when I do worker =
MiddleMan(:tag_sending_worker) in my controller i get "undefined method
`MiddleMan’ for #SchedulesController:0x25be080 , but when i do it from
the console it works fine.

Of course i tried restarting my mongrel and restarting the backgroundrb
process but no luck , any ideas o this ? It iis a weird problem , I
don’t know why it does the lookup in my Controller class only :frowning:

Okay. Looks like, you have config.plugins in your
RAILS_ROOT/environments/production.rb and hence backgroundrb isn’t
getting loaded. If not that, are you using config.plugins in
environment.rb??

[email protected] wrote:

hi,

the invocation in your controller should go
Middleman.worker(:my_worker).my_method(:arguments)
see documentation: http://backgroundrb.rubyforge.org/

btw I’m not using backgroundrb anymore, i got fed up with unclear
error messages and relative instability. I’m now using workling-
starling for any new projects.

Elise

On Jan 8, 3:22�pm, Federico B. <rails-mailing-l…@andreas-

Thanks Elise that worked !