Dumb problem using BackgroundRb


#1

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


#2

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-


#3

On Thu, Jan 8, 2009 at 7:52 PM, Federico B.
removed_email_address@domain.invalid 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??


#4

removed_email_address@domain.invalid 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 !