James Hughes
2006-Aug-25 21:22 UTC
[Backgroundrb-devel] Rake tasks fail silently, how to debug?
Hi, I''ve been using backgroundrb with some success up to now, but now when I do the start or setup tasks they just fail silently. Nothing in the log, no .pid file, and nothing in the process list. Rake with -trace just says, ** Invoke backgroundrb:setup (first_time) ** Execute backgroundrb:setup Any hints on how I can get more verbosity, or thoughts on what might be happening? (This happens with both the rails gem and edge; also, I''m tracking backgroundrb via svn:externals) thanks, jh -- 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"?''
Ezra Zygmuntowicz
2006-Aug-25 21:33 UTC
[Backgroundrb-devel] Rake tasks fail silently, how to debug?
On Aug 25, 2006, at 2:22 PM, James Hughes wrote:> Hi, > > I''ve been using backgroundrb with some success up to now, but now when > I do the start or setup tasks they just fail silently. Nothing in the > log, no .pid file, and nothing in the process list. Rake with -trace > just says, > > ** Invoke backgroundrb:setup (first_time) > ** Execute backgroundrb:setup > > Any hints on how I can get more verbosity, or thoughts on what might > be happening? > > (This happens with both the rails gem and edge; also, I''m tracking > backgroundrb via svn:externals) > > thanks, > jh > > -- > James Hughes > Web application developer > Vancouver, BCHey James- When did this start happening? If you roll back one revision from trunk does that fix it? I just did a fresh svn co of trunk and was able to run the setup and start tasks without any issues. So please try again. Aslo can you use the start script directly instead of the rake task? Take a look in the rake task you can see what it does, it just copies the script dir up into your rails app and makes a config file. I don''t know how to make rake more verbose in this case. Maybe open up the rakefile and add some puts statements and tell me what you find out would you? -Ezra
James Hughes
2006-Aug-25 22:09 UTC
[Backgroundrb-devel] Rake tasks fail silently, how to debug?
(Sorry, I keep forgetting reply-all on this list) On 8/25/06, Ezra Zygmuntowicz <ezmobius at gmail.com> wrote:> > On Aug 25, 2006, at 2:22 PM, James Hughes wrote: > > > Any hints on how I can get more verbosity, or thoughts on what might > > be happening? > > > > (This happens with both the rails gem and edge; also, I''m tracking > > backgroundrb via svn:externals) > > Hey James- > > When did this start happening? If you roll back one revision from > trunk does that fix it? I just did a fresh svn co of trunk and was > able to run the setup and start tasks without any issues. So please > try again. Aslo can you use the start script directly instead of the > rake task? Take a look in the rake task you can see what it does, it > just copies the script dir up into your rails app and makes a config > file. I don''t know how to make rake more verbose in this case. Maybe > open up the rakefile and add some puts statements and tell me what > you find out would you? > > -Ezra >Hi Ezra, I''ve done what you suggest. The setup task actually appears to be behaving correctly: all the scripts and config are already in place so it''s not actually failing, it''s just not doing anything. However, when I run the start script directly (i.e. not with rake), without the -d option, I get the following: /home/jhughes/work/media-catalog/trunk/config/../script/backgroundrb/start:99: private method `new'' called for BackgrounDRb::MiddleMan:Class (NoMethodError). Something''s not where it''s supposed to be, but I''m not sure what. jh ps. Also possibly relevant, when I run the tests I get the following failure: 1) Failure: test_new_worker(BackgrounDRbTest) [./test/test_backgroundrb.rb:43]: <nil> expected to be kind_of? <Integer> but was <NilClass>. -- 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"?''
Ezra Zygmuntowicz
2006-Aug-25 23:04 UTC
[Backgroundrb-devel] Rake tasks fail silently, how to debug?
On Aug 25, 2006, at 3:09 PM, James Hughes wrote:> (Sorry, I keep forgetting reply-all on this list) > > On 8/25/06, Ezra Zygmuntowicz <ezmobius at gmail.com> wrote: >> >> On Aug 25, 2006, at 2:22 PM, James Hughes wrote: >> >>> Any hints on how I can get more verbosity, or thoughts on what might >>> be happening? >>> >>> (This happens with both the rails gem and edge; also, I''m tracking >>> backgroundrb via svn:externals) >> >> Hey James- >> >> When did this start happening? If you roll back one >> revision from >> trunk does that fix it? I just did a fresh svn co of trunk and was >> able to run the setup and start tasks without any issues. So please >> try again. Aslo can you use the start script directly instead of the >> rake task? Take a look in the rake task you can see what it does, it >> just copies the script dir up into your rails app and makes a config >> file. I don''t know how to make rake more verbose in this case. Maybe >> open up the rakefile and add some puts statements and tell me what >> you find out would you? >> >> -Ezra >> > > Hi Ezra, > > I''ve done what you suggest. The setup task actually appears to be > behaving correctly: all the scripts and config are already in place so > it''s not actually failing, it''s just not doing anything. However, when > I run the start script directly (i.e. not with rake), without the -d > option, I get the following: > > /home/jhughes/work/media-catalog/trunk/config/../script/ > backgroundrb/start:99: > private method `new'' called for BackgrounDRb::MiddleMan:Class > (NoMethodError). > > Something''s not where it''s supposed to be, but I''m not sure what. > jh > > ps. Also possibly relevant, when I run the tests I get the > following failure: > > 1) Failure: > test_new_worker(BackgrounDRbTest) [./test/test_backgroundrb.rb:43]: > <nil> > expected to be kind_of? > <Integer> but was > <NilClass>.Hey James- I think that somehow you are getting a few versions mixed up. I recently made the MiddleMan class be a singleton so that accounts for the error of private method new . I think what you should do is remove all traces of the plugin from your app. Except you can leave your workers in lib/workers. But remove everything esle , the plugin the config file and the script/backgroundrb dir from your rails app. Then reinstall the plugin from trunk and rerun the setup task and try again. I think that should fix the problem. It seems like you may have parts of two different versions installed and that is what is causing the errors. Cheers- -Ezra
James Hughes
2006-Aug-25 23:08 UTC
[Backgroundrb-devel] Rake tasks fail silently, how to debug?
> > /home/jhughes/work/media-catalog/trunk/config/../script/backgroundrb/start:99: > private method `new'' called for BackgrounDRb::MiddleMan:Class > (NoMethodError).Ok, above was due to old start/stop scripts lying around in rails'' script directory. I didn''t realize you have to clobber the entire script/backgroundrb directory in order for setup to recopy these. thanks, jh -- 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"?''