if that doesnt work it may also be down to the way your script is being run.<br><br>eg. I belive that capistrano commands are issued seperately, rather than through a sustained Bash session, so ~/.profile doesn't get loaded.<br>
<br>get a script runner to do "puts system("echo $PATH")"<br>or something (when you've temporarily set the shebang to the full path)<br>then you'll know the PATH in the exact instance!<br><br><div class="gmail_quote">
2008/6/27 Roland Swingler <<a href="mailto:roland.swingler@gmail.com">roland.swingler@gmail.com</a>>:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi,<br>
<br>
Presumably Bj is a background job runner?<br>
<br>
It might be possible that the PATH variable isn't set for the user<br>
that is running, or at least doesn't include the directory with ruby<br>
in it.<br>
<br>
So it will work for you on the command line, because your user has<br>
ruby in its path. You could try "su your-bj-user" and then "echo<br>
$PATH" to check this.<br>
<br>
Cheers,<br>
<font color="#888888">Roland<br>
</font><div><div></div><div class="Wj3C7c"><br>
On Fri, Jun 27, 2008 at 10:09 AM, Andrew Stewart<br>
<<a href="mailto:boss@airbladesoftware.com">boss@airbladesoftware.com</a>> wrote:<br>
> Hola El Rugsters,<br>
><br>
> In an action in a Rails app, I submit jobs to bj[1] like this:<br>
><br>
> Bj.submit "./script/runner 'Archive.find(#{@<a href="http://archive.id" target="_blank">archive.id</a>}).rebuild'"<br>
><br>
> The jobs start, but fail with this on stderr:<br>
><br>
> /usr/bin/env: ruby: No such file or directory<br>
><br>
> My app's script/runner has this shebang line:<br>
><br>
> #!/usr/bin/env ruby<br>
><br>
> However, env works on the command line:<br>
><br>
> $ /usr/bin/env ruby -v # ruby 1.8.6 etc<br>
> $ /usr/bin/env ruby -e "puts 'foo'" # foo<br>
><br>
> Any ideas how to get my jobs running correctly? I suppose I could work<br>
> around the problem by changing the shebang line in script/runner to point<br>
> directly to my ruby installation, but I'd rather not touch that<br>
> Rails-generated file.<br>
><br>
> Thanks and regards,<br>
> Andy<br>
><br>
> [1] <a href="http://codeforpeople.rubyforge.org/svn/bj/trunk/README" target="_blank">http://codeforpeople.rubyforge.org/svn/bj/trunk/README</a><br>
><br>
> -------<br>
> AirBlade Software Ltd<br>
> <a href="http://airbladesoftware.com" target="_blank">http://airbladesoftware.com</a><br>
><br>
><br>
><br>
><br>
><br>
> _______________________________________________<br>
> Chat mailing list<br>
> <a href="mailto:Chat@lists.lrug.org">Chat@lists.lrug.org</a><br>
> <a href="http://lists.lrug.org/listinfo.cgi/chat-lrug.org" target="_blank">http://lists.lrug.org/listinfo.cgi/chat-lrug.org</a><br>
><br>
_______________________________________________<br>
Chat mailing list<br>
<a href="mailto:Chat@lists.lrug.org">Chat@lists.lrug.org</a><br>
<a href="http://lists.lrug.org/listinfo.cgi/chat-lrug.org" target="_blank">http://lists.lrug.org/listinfo.cgi/chat-lrug.org</a><br>
</div></div></blockquote></div><br>