# Dumb problem using BackgroundRb

**URL:** <https://www.ruby-forum.com/t/dumb-problem-using-backgroundrb/157214>\
**Category:** Rails\
**Created:** [January 8, 2009, 3:22pm UTC](https://www.ruby-forum.com/t/dumb-problem-using-backgroundrb/157214 "2009-01-08T15:22:19Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![fbrubacher](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/ee59a6/32.png) [@fbrubacher](https://www.ruby-forum.com/u/fbrubacher)\
**Post date:** [January 8, 2009, 3:22pm UTC](https://www.ruby-forum.com/t/dumb-problem-using-backgroundrb/157214/1 "2009-01-08T15:22:19Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![fbrubacher](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/ee59a6/32.png) [@fbrubacher](https://www.ruby-forum.com/u/fbrubacher)\
**Post date:** [January 8, 2009, 4:56pm UTC](https://www.ruby-forum.com/t/dumb-problem-using-backgroundrb/157214/2 "2009-01-08T16:56:14Z")

</div>

hi,

the invocation in your controller should go  
Middleman.worker(:my\_worker).my\_method(:arguments)  
see documentation: [http://backgroundrb.rubyforge.org/](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-

---

<div class="post-metadata">

**Author:** ![fbrubacher](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/ee59a6/32.png) [@fbrubacher](https://www.ruby-forum.com/u/fbrubacher)\
**Post date:** [January 8, 2009, 7:41pm UTC](https://www.ruby-forum.com/t/dumb-problem-using-backgroundrb/157214/3 "2009-01-08T19:41:28Z")

</div>

On Thu, Jan 8, 2009 at 7:52 PM, Federico B.  
[removed\_email\_address@domain.invalid](mailto: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??

---

<div class="post-metadata">

**Author:** ![fbrubacher](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/ee59a6/32.png) [@fbrubacher](https://www.ruby-forum.com/u/fbrubacher)\
**Post date:** [January 9, 2009, 12:03am UTC](https://www.ruby-forum.com/t/dumb-problem-using-backgroundrb/157214/4 "2009-01-09T00:03:46Z")

</div>

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/](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 !
