<div>Hi Geoff,</div>  <div>&nbsp;</div>  <div>Yes, I do have it at the end of the script. I just forgot to copy it in the message.</div>  <div>&nbsp;</div>  <div>Tiberiu<BR><BR><B><I>Geoff Garside &lt;ruby@geoffgarside.co.uk&gt;</I></B> wrote:</div>  <BLOCKQUOTE class=replbq style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #1010ff 2px solid">  <DIV>  <DIV>On 25 Jun 2007, at 01:28, Tiberiu Motoc wrote:</DIV><BR class=Apple-interchange-newline>  <BLOCKQUOTE type="cite">  <DIV>Hi everyone,</DIV>  <DIV>&nbsp;</DIV>  <DIV>I'm new to backgroundrb, and I'm trying to get started with a simple example, yet with no success.</DIV>  <DIV>&nbsp;</DIV>  <DIV>This is the code that I have in RAILS_ROOT/lib/workers/testing_worker.rb</DIV>  <DIV>class TestingWorker &lt; BackgrounDRb::Worker::RailsBase</DIV>  <DIV>&nbsp; def do_work(args)<BR>&nbsp;&nbsp;&nbsp; # This method is called in it's own new thread when you<BR>&nbsp;&nbsp;&nbsp; # call new worker. args is set to :args</DIV> 
 <DIV>&nbsp;&nbsp;&nbsp; logger.info('TestingWorker do work')<BR>&nbsp;&nbsp;&nbsp; results[:do_work_time] = Time.now_to_s<BR>&nbsp;&nbsp;&nbsp; results[:done_with_do_work] || = true<BR>&nbsp; end</DIV>  <DIV>end</DIV></BLOCKQUOTE>  <DIV><BR class=webkit-block-placeholder></DIV>  <DIV>Do you have</DIV>  <DIV><BR class=webkit-block-placeholder></DIV>  <DIV><SPAN class=Apple-tab-span style="WHITE-SPACE: pre"></SPAN>TestingWorker.register<BR class=webkit-block-placeholder></DIV>  <DIV><BR class=webkit-block-placeholder></DIV>  <DIV>at the end of the testing_worker.rb file?</DIV><BR>  <BLOCKQUOTE type="cite">  <DIV>&nbsp;</DIV>  <DIV>And this is the code that I have in RAILS_ROOT/app/controllers/mytest2_controller.rb</DIV>  <DIV>class Mytest2Controller &lt; ApplicationController<BR>&nbsp; def new<BR>&nbsp;&nbsp;&nbsp; key = MiddleMan.new_worker(:class =&gt; :testing_worker)<BR>&nbsp;&nbsp;&nbsp; worker = MiddleMan.worker(key)<BR>&nbsp;&nbsp;&nbsp;
 #worker.other_method<BR>&nbsp;&nbsp;&nbsp; #worker.delete<BR>&nbsp; end<BR>end</DIV></BLOCKQUOTE>  <BLOCKQUOTE type="cite">  <DIV>&nbsp;</DIV>  <DIV>And this is what I get when I access: <A href="http://host:3000/mytest2/new">http://host:3000/mytest2/new</A></DIV>  <DIV>&nbsp;NameError in Mytest2Controller#new</DIV>  <DIV>&nbsp;uninitialized constant TestingWorker<BR>&nbsp;RAILS_ROOT: script/../config/..<BR>&nbsp;Application Trace | Framework Trace | Full Trace</DIV>  <DIV>&nbsp;</DIV>  <DIV>I don't understand why I'm getting the "uninitialized constant" error. I've read other postings with the same issue, and I understand that you must restart the server after adding/making modifications to your workers. The server is restarted with the following commands: ./script/backgroundrb stop and ./script/bacgroundrb start, right? (I don't even think this applies to me, since first I created all&nbsp;necessary files for the example&nbsp;and then I started the server; I did restart
 the server several times just to make sure this is not a problem)</DIV>  <DIV>I also tried to use the console and I get a similar message.</DIV>  <DIV>Btw, I have changed nothing in the default setup, except in /server/lib/backgroundrb/console.rb, where I commented out the line "require 'irb/completion'" due to a strange error that I was getting.</DIV>  <DIV>&nbsp;</DIV>  <DIV>Thanks,</DIV>  <DIV>Tiberiu</DIV>  <DIV>&nbsp;</DIV>  <DIV>PS. I want to make sure that the way I downloaded backgroundrb is not faulty. Instead of getting it via subversion (trying to save time by not involving my admin), I just downloaded file by file from <A href="http://svn.devjavu.com/backgroundrb/tags/release-0.2.1">http://svn.devjavu.com/backgroundrb/tags/release-0.2.1</A>.</DIV>  <DIV><BR class=khtml-block-placeholder></DIV>  <HR SIZE=1>  Ask a question on any topic and get answers from real people. <A href="http://ca.answers.yahoo.com/"><B>Go to Yahoo! Answers.</B></A>  <DIV style="MARGIN:
 0px">_______________________________________________</DIV>  <DIV style="MARGIN: 0px">Backgroundrb-devel mailing list</DIV>  <DIV style="MARGIN: 0px"><A href="mailto:Backgroundrb-devel@rubyforge.org">Backgroundrb-devel@rubyforge.org</A></DIV>  <DIV style="MARGIN: 0px"><A href="http://rubyforge.org/mailman/listinfo/backgroundrb-devel">http://rubyforge.org/mailman/listinfo/backgroundrb-devel</A></DIV></BLOCKQUOTE><BR></DIV>  <DIV>Regards,</DIV>  <DIV>Geoff</DIV><BR></BLOCKQUOTE><BR><p>&#32;
      <hr size=1><a href="http://us.rd.yahoo.com/evt=40705/*http://mrd.mail.yahoo.com/try_beta?.intl=ca"><b>All new Yahoo! Mail </b></a> 
<hr size=1>Get news delivered. Enjoy RSS feeds right on your Mail page.