[Backgroundrb-devel] 'uninitialized constant' error

Aravind Elango aela at loc.gov
Mon Jul 10 16:39:31 EDT 2006

Hi All,

I am fairly new to Ruby and backgroundRB.  I am trying to run a simple example in Windows to get my feet wet with backgroundRB and am running into an 'uninitialized constant' error when I invoke the controller on my rails app. 

In 'MyTest' Controller
def longrun
      session[:job_key] = MiddleMan.new_worker(:class => :tail_worker, :args => {:baz => 'hello!', :qux => 'another arg!'})

In cookbook\lib\workers\tail_worker.rb
class TailWorker < BackgrounDRb::Rails
  def do_work(args)
    puts "Printing from inside TailWorker::do_work()"

When I issue the request to
I get the following error:
NameError in My testController#longrun
uninitialized constant TailWorker

I'd appreciate any light thrown on what I might have done to cause this error and about how to rectify it.

Aravind Elango

More information about the Backgroundrb-devel mailing list