Forum: Ruby on Rails Dumb problem using BackgroundRb

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Federico B. (Guest)
on 2009-01-08 16:22
 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 :(

Thanks a lot in advance
(Guest)
on 2009-01-08 17:56
(Received via mailing list)
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-
Hemant K. (Guest)
on 2009-01-08 20:41
(Received via mailing list)
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 :(
>

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??
Federico B. (Guest)
on 2009-01-09 01:03
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 !
This topic is locked and can not be replied to.