[Backgroundrb-devel] example standalone error.
ezmobius at gmail.com
Fri Mar 2 14:23:26 EST 2007
For standalone mode you have to do something like this:
MiddleMan = BackgrounDRb::MiddleManDRbObject.init(:uri =>'drbunix:///
On Mar 1, 2007, at 11:02 PM, David Gurba wrote:
> 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'
> #MiddleManDRbObject.init(:uri =>'drbunix:///tmp/
> 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) view
> # 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.
> Backgroundrb-devel mailing list
> Backgroundrb-devel at rubyforge.org
-- Ezra Zygmuntowicz
-- Lead Rails Evangelist
-- ez at engineyard.com
-- Engine Yard, Serious Rails Hosting
-- (866) 518-YARD (9273)
More information about the Backgroundrb-devel