[Backgroundrb-devel] backgroundrb and autotest

Ezra Zygmuntowicz ezmobius at gmail.com
Tue Jul 18 15:07:27 EDT 2006


On Jul 18, 2006, at 11:51 AM, James Hughes wrote:

> Hi,
>
> First, thanks for the plugin. Sorry if this is not strictly a
> backgroundrb issue but I thought others on this list might have come
> across this problem.
>
> I'm trying to run the test that comes via the worker generator.  The
> test works fine when running 'rake test_functional', but when the
> tests are run by autotest I get "uninitialized constant BackgrounDRb"
> (full stack trace below). I notice that BackgrounDRb::Rails is defined
> in "script/lib", is this a non-standard location that autotest somehow
> bypasses? I'm totally clueless as to how Rails loads plugins, so if
> anyone else has seen this issue, help appreciated.
>
'
Hey James-

	Yeah having the main file in script/lib was a mistake. I have  
changed that in more recent version s to leave all code exzcept for  
stubs for the start and stop scripts within the plugin. So I  
recommend that you update to the newest version of the plugin and  
start from there. I'm not sure how autotest will deal with testing  
workers. It is a bit tough to test the workers in there real life  
state and I haven't used autotest with this plugin yet. So try it  
with the latest version and let me know if that works for you. You  
will need to remove the entire script/backgroundrb folder and the  
config/backgroundrb.yml files from your app and run rake  
backgroundrb:setup again once you install the new version.


-Ezra




> The stack trace:
>
> /usr/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/ 
> dependencies.rb:123:in
> `const_missing': uninitialized constant BackgrounDRb (NameError)
> 	from /usr/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/ 
> active_support/dependencies.rb:131:in
> `const_missing'
> 	from /home/jhughes/work/project-tracker-rails/trunk/config/../lib/ 
> workers/task_checker_worker.rb:5
> 	from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in  
> `require'
> 	from /usr/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/ 
> active_support/dependencies.rb:147:in
> `require'
> 	from ./test/unit/task_checker_worker_test.rb:2
> 	from /usr/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/ 
> active_support/dependencies.rb:140:in
> `load'
> 	from -e:1
> 	from -e:1
> /usr/lib/ruby/gems/1.8/gems/ZenTest-3.2.0/lib/unit_diff.rb:196:in
> `unit_diff': undefined method `first' for nil:NilClass (NoMethodError)
> 	from /usr/lib/ruby/gems/1.8/gems/ZenTest-3.2.0/lib/unit_diff.rb:84:in
> `unit_diff'
> 	from /usr/lib/ruby/gems/1.8/gems/ZenTest-3.2.0/bin/unit_diff:38
> 	from /usr/bin/unit_diff:18
>
> -- 
> James Hughes
> Web application developer
> Vancouver, BC
>
> "Developing a coherent political analysis is in many respects
> contingent upon an ability to connect one context to another, a
> process not dissimilar to playing the kid's game of dot-to-dot."
>  - Ward Churchill, from '"A Government of Laws"?'
> _______________________________________________
> Backgroundrb-devel mailing list
> Backgroundrb-devel at rubyforge.org
> http://rubyforge.org/mailman/listinfo/backgroundrb-devel



More information about the Backgroundrb-devel mailing list