Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 16 Dec 2009 21:19:23 -0700 (MST)
From:      Warren Block <wblock@wonkity.com>
To:        Kevin <battdude@gmail.com>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: portupgrade failure
Message-ID:  <alpine.BSF.2.00.0912162105340.98796@wonkity.com>
In-Reply-To: <7314e5020912161917s355d02c9l16c996043c753044@mail.gmail.com>
References:  <7314e5020912161917s355d02c9l16c996043c753044@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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:

SHELL=/bin/sh
PATH=/etc:/bin:/sbin:/usr/bin:/usr/sbin

> I also receive the same message at the end of the output for
> "/usr/sbin/portsnap cron update && /usr/local/sbin/portsdb -u >
> /dev/null" run from cron:

portsdb is another ruby script.  Same deal; cron running env can't find 
ruby.

-Warren Block * Rapid City, South Dakota USA



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?alpine.BSF.2.00.0912162105340.98796>