wblock at wonkity.com
Thu Dec 17 04:53:51 UTC 2009
On Wed, 16 Dec 2009, Warren Block wrote:
> On Wed, 16 Dec 2009, Kevin wrote:
>> The only other symptoms I can identify right now are related to the
>> following entries in my crontab:
>> 0 2 * * 6 /usr/local/sbin/portsclean -DD
>> 0 2 * * 5 /usr/local/sbin/portsclean -C
>> The e-mailed results simply say "env: ruby: No such file or
>> directory". However, these commands seem to run fine from an
>> interactive shell (while logged in).
> Paths. When there's a problem with cron it's (almost) always paths.
> portsclean is a ruby script that starts with this line:
> #!/usr/bin/env ruby
> That should find and run ruby. Your /etc/crontab should have these lines:
And now that I tried a test with these manual paths, the same thing
# setenv PATH /etc:/bin:/sbin:/usr/bin:/usr/sbin
# env ruby
env: ruby: No such file or directory
Doh. ruby and ruby18 are in /usr/local/bin.
So it's working as designed. A reasonable way to fix this is to add
:/usr/local/bin to the crontab path, but that may not be the right way
to fix it.
-Warren Block * Rapid City, South Dakota USA
More information about the freebsd-questions