From owner-freebsd-questions@FreeBSD.ORG Thu Dec 17 04:53:51 2009 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0B6071065672 for ; Thu, 17 Dec 2009 04:53:51 +0000 (UTC) (envelope-from wblock@wonkity.com) Received: from wonkity.com (wonkity.com [67.158.26.137]) by mx1.freebsd.org (Postfix) with ESMTP id 704048FC18 for ; Thu, 17 Dec 2009 04:53:50 +0000 (UTC) Received: from wonkity.com (localhost [127.0.0.1]) by wonkity.com (8.14.3/8.14.3) with ESMTP id nBH4rnQL099034; Wed, 16 Dec 2009 21:53:49 -0700 (MST) (envelope-from wblock@wonkity.com) Received: from localhost (wblock@localhost) by wonkity.com (8.14.3/8.14.3/Submit) with ESMTP id nBH4rnnx099031; Wed, 16 Dec 2009 21:53:49 -0700 (MST) (envelope-from wblock@wonkity.com) Date: Wed, 16 Dec 2009 21:53:49 -0700 (MST) From: Warren Block To: Kevin In-Reply-To: Message-ID: References: <7314e5020912161917s355d02c9l16c996043c753044@mail.gmail.com> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.3 (wonkity.com [127.0.0.1]); Wed, 16 Dec 2009 21:53:49 -0700 (MST) Cc: freebsd-questions@freebsd.org Subject: Re: portupgrade failure X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Dec 2009 04:53:51 -0000 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: > > SHELL=/bin/sh > PATH=/etc:/bin:/sbin:/usr/bin:/usr/sbin And now that I tried a test with these manual paths, the same thing happens: # 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