# Bj 1.0.1 -- can I rerun jobs that have had errors

**URL:** <https://www.ruby-forum.com/t/bj-1-0-1-can-i-rerun-jobs-that-have-had-errors/135806>\
**Category:** Ruby\
**Created:** [April 25, 2008, 5:45am UTC](https://www.ruby-forum.com/t/bj-1-0-1-can-i-rerun-jobs-that-have-had-errors/135806 "2008-04-25T05:45:40Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![stepheneb](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/71e660/32.png) [@stepheneb](https://www.ruby-forum.com/u/stepheneb)\
**Post date:** [April 25, 2008, 5:45am UTC](https://www.ruby-forum.com/t/bj-1-0-1-can-i-rerun-jobs-that-have-had-errors/135806/1 "2008-04-25T05:45:40Z")

</div>

ara,

Backgroundjob works great – Thanks!

I have about 40 jobs in the job table that have errors and I’d like  
to rerun them because I’ve fixed the condition which caused the  
error. Is there a way to re-run them using Bj?

— fyi: background on my problem for others —

I’m running rails fcgi instances from lighttpd and ruby is located here:

/usr/local/bin/ruby

Long ago I had set the ruby shell interpreter path for dispatch.fcgi to:

/usr/local/bin/ruby

and forgot about it.

./script/runner uses:

/usr/bin/env ruby

Which when running under the lighttpd user resolves to:

/usr/bin/ruby

Which isn’t the same ruby and doesn’t have the same gems.

I could fix it by re-writing the shell interpreter path for  
script/runner or by changing the lighttpd.conf file by adding “PATH”  
=\> “/usr/local/bin” to the bin-environment setting in the  
fastcgi.server for the rails app.

Example:

fastcgi.server = ( “.fcgi” =\>  
(  
(  
“socket” =\> basedir + “railsapp/log/code.socket”,  
“min-procs” =\> 2,  
“max-procs” =\> 8,  
“bin-path” =\> basedir + “railsapp/public/dispatch.fcgi”,  
“bin-environment” =\> ( “RAILS\_ENV” =\> “production”,  
“RAILS\_RELATIVE\_URL\_ROOT” =\> “/railsapp”, “PATH” =\> “/usr/local/bin” )  
)))
