Thank you,<br> you are right it was my mistake to require the worker class in my controller, I did not know that the file will be "included" by MiddleMan.new_worker and no need of require ; now it is ok.<br><br>
Gabriel<br><br><div><span class="gmail_quote">On 2/7/07, <b class="gmail_sendername">skaar</b> <<a href="mailto:skaar@waste.org">skaar@waste.org</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
I'm not quite sure what you are trying to do here - are you trying to<br>require a file with a BackgrounDRb worker class in your Rails<br>controller? In that case - that's just not how it works. The BackgrouDRb<br>
worker classes need the backgroundrb server process. Take a look at the<br>documentation again.<br><br>/skaar<br><br><br>* Gabi Ciudoiu (<a href="mailto:ciudica@gmail.com">ciudica@gmail.com</a>) [070207 03:59]:<br>> I have the next including files structure :
<br>><br>> - controller fileaA.rb including line (#8): require "fileB"...<br>> - /lib/fileB.rb with main header: load 'backgroundrb/worker.rb'<br>> load 'backgroundrb/
<br>> worker_rails.rb'<br>> class FileB <<br>> BackgrounDRb::Worker::RailsBase<br>> ........................................................................
<br>> and on line #72: FileB .register<br>> when I restart my lighttpd web server , at the first loading of the<br>> controller it rise the next error:<br>><br>> You have a nil object when you didn't expect it!
<br>> You might have expected an instance of Array.<br>><br>> The error occured while evaluating nil.include?<br>><br>> RAILS_ROOT: ......<br>> Application Trace | Framework Trace | Full Trace<br>>
<br>> #{RAILS_ROOT}/vendor/plugins/backgroundrb/server/lib/backgroundrb<br>> /<br>> middleman.rb:158:in `register_worker_class'<br>> #{RAILS_ROOT}/vendor/plugins/backgroundrb/server/lib/backgroundrb<br>
> /<br>> worker.rb:17:in `register'<br>> #{RAILS_ROOT}/lib/fileB.rb:72<br>> #{RAILS_ROOT}/app/controllers/fileA.rb:8<br>><br>> After reloading the page, this error did not rise again , I need help
<br>> with any idea concerning this behavior of backgroundrb plugin (what is<br>> wrong in my including code or what could generate this error?)<br>><br>> Thank's<br><br>> _______________________________________________
<br>> Backgroundrb-devel mailing list<br>> <a href="mailto:Backgroundrb-devel@rubyforge.org">Backgroundrb-devel@rubyforge.org</a><br>> <a href="http://rubyforge.org/mailman/listinfo/backgroundrb-devel">http://rubyforge.org/mailman/listinfo/backgroundrb-devel
</a><br><br>--<br>----------------------------------------------------------------------<br>|\|\ where in the | s_u_b_s_t_r_u_c_t_i_o_n<br>| | >=========== W.A.S.T.E. | genarratologies
<br>|/|/ (_) is the wisdom | <a href="mailto:skaar@waste.org">skaar@waste.org</a><br>----------------------------------------------------------------------<br></blockquote></div><br>