[Backgroundrb-devel] example standalone error.

David Gurba david.gurba at gmail.com
Fri Mar 2 02:02:54 EST 2007


Trying to get the example to work in standalone mode.  I have the following
in a file and am not certain why I get this undefined method error:

~/ruby sample_app.rb
my sample app :)
sample_app.rb:9: undefined method `new_worker' for
BackgrounDRb::MiddleMan:Class (NoMethodError)

### code follows ###
# sample_app ... try to get stand-alone happiness.
#require 'release-0.2.1/lib/backgroundrb'

require 'backgroundrb/middleman'
include BackgrounDRb
puts 'my sample app :)'

key = MiddleMan.new_worker(:class => :example_worker)
worker = MiddleMan.worker(key)

# now that my job is done (and my worker is actually deleted on the server)
# my results ... cause now I'lm interested.
p worker.results.to_hash
puts 'bye bye :)'

I kinda confused because most of the examples online and in /examples assume
that one is using Rails for this.  Its kind of difficult to see exactly
where require or init calls need to go.

David G.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/backgroundrb-devel/attachments/20070301/81c2a77f/attachment.html 

More information about the Backgroundrb-devel mailing list