Re: Problem with crontab and script/runner

Brandon Olivares
Tue, 21 Apr 2009 08:52:14 -0000

Hi,

Ruby isn''t in /usr/local/bin/ruby. Run `which ruby'' to see
where it is.

You shouldn''t need to have that path to ruby though before calling
script/runner, because it looks like it already has a shebang line.

Brandon

> -----Original Message-----
> From: rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
[mailto:rubyonrails-
> talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org] On Behalf Of Jose vicente
Ribera pellicer
> Sent: Tuesday, April 21, 2009 4:38 AM
> To: rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
> Subject: [Rails] Problem with crontab and script/runner
>
>
> Hi guys, I''m trying to run some process in backgroung each minute
using
> script/runner.
>
> To do this I use crontab-e and I edit the crontab. This is the line i
> wrote:
>
> */1 * * * * /usr/local/bin/ruby /Users/jose/mimandote.com/script/runner
> ''Usuario.usuario_del_dia''
>
> The console says me taht I have new mail in /var/mail/jose. the mail
> say
> this:
>
> From jose-fcf2JQ7/yFus1BDpvl8NfQ@public.gmane.org  Tue Apr 21 10:34:00 2009
> Return-Path: <jose-fcf2JQ7/yFus1BDpvl8NfQ@public.gmane.org>
> X-Original-To: jose
> Delivered-To: jose-fcf2JQ7/yFus1BDpvl8NfQ@public.gmane.org
> Received: by Jose.local (Postfix, from userid 503)
>         id 8E2C853DAC4; Tue, 21 Apr 2009 10:34:00 +0200 (CEST)
> From: jose-fcf2JQ7/yFus1BDpvl8NfQ@public.gmane.org (Cron Daemon)
> To: jose-fcf2JQ7/yFus1BDpvl8NfQ@public.gmane.org
> Subject: Cron <jose@Jose> /usr/local/bin/ruby
> /Users/jose/mimandote.com/script/runner
''Usuario.usuario_del_dia''
> X-Cron-Env: <SHELL=/bin/sh>
> X-Cron-Env: <PATH=/usr/bin:/bin>
> X-Cron-Env: <LOGNAME=jose>
> X-Cron-Env: <USER=jose>
> X-Cron-Env: <HOME=/Users/jose>
> Message-Id:
<20090421083400.8E2C853DAC4-fcf2JQ7/yFus1BDpvl8NfQ@public.gmane.org>
> Date: Tue, 21 Apr 2009 10:34:00 +0200 (CEST)
>
> /bin/sh: /usr/local/bin/ruby: No such file or directory
>
> Somebody can help me to solve this error?
> --
> Posted via http://www.ruby-forum.com/.
>
>