AJAX updates for execution progress status

I need to update multiple areas on my page within the same controller,
where statuses are updated as test scripts are being run and completed.
My js first renders a list of the available test cases to run, then I
have a loop running the execution of each script and doing a
page.replace_html, but nothing is rendered until everything has finished

I'm wondering how I can display the list first, then have the statuses
being updated on the page during the test script execution instead?

You want something along the lines of periodically call remote.

I did something vaguely like this and made a little screen cast
somewhere... lemmie look...

OK, found it:


And the tutorial:


Hope that helps


Thanks Mikel, I checked out your screencast and that looks really neat.

I installed the backgroundrb plugin along with the chronic and packet
gems but when I try starting the server using:

script/background start

I get the following error in my log file:

`load_missing_constant': uninitialized constant BackgrounDRb::Rails
  from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in
  from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in
  from script/backgroundrb:46:in `new'
  from script/backgroundrb:46

I can't seem to figure it out and I've tried reinstalling the plugin a
few times. Would you have any idea what would be the problem?


Mikel Lindsaar wrote:

That screencast is cool, albeit a bit old(meaning your worker code is
wrong, in all probability).

You want to perhaps refer:


Also, there is a mailing list and IRC channel for BackgrounDRb, where
you can ask questions if in doubt.

(IRC, is not very active all the time).

Yup I had followed the instructions on the rubyforge page just to set up
the BackgrounDRb without actually setting up any of my own workers. I
just try to start the server and I can't get it running...

Hemant Kumar wrote:

You are trying to inherit BackgrounDRb::Rails in your worker code(as
seen from exception), and that class no longer exists(it has been
removed like 6 months back) and hence I asked you to read the
documentation and try.

An empty worker looks like:

class BillingWorker < BackgrounDRb::MetaWorker
  set_worker_name :billing_worker
  def create(args = nil)
    # method gets called, when new instance of worker is created.

Thanks for the help, I began running server and played around using
MiddleMan to create new workers in the client terminal. However, when I
try to use methods such as delete_worker() or send_request() I get
errors such as this:

NoMethodError: undefined method `delete_worker' for

In my background.yml file I only have the following specified so it
doesn't seem like I'm using any clustering: