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@Jose.local Tue Apr 21 10:34:00 2009
Return-Path: <jose@Jose.local>
X-Original-To: jose
Delivered-To: jose@Jose.local
Received: by Jose.local (Postfix, from userid 503)
        id 8E2C853DAC4; 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?

At the risk of sounding completely stupid, where is your ruby
interpreter ?

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

I tried with this:

*/1 * * * * /Users/jose/mimandote.com/script/runner
'Usuario.usuario_del_dia'

with the same result :frowning:

From: rubyonrails-talk@googlegroups.com [mailto:rubyonrails-
talk@googlegroups.com] On Behalf Of Jose vicente Ribera pellicer
Sent: Tuesday, April 21, 2009 5:54 AM
To: rubyonrails-talk@googlegroups.com
Subject: [Rails] Re: Problem with crontab and script/runner

I tried with this:

*/1 * * * * /Users/jose/mimandote.com/script/runner
'Usuario.usuario_del_dia'

with the same result :frowning:

Have you tried running it directly to see if it works or not?

If it's not giving any errors, then the script is probably running.

Brandon

Sometimes you should test the file which is executed or not.
So I suggest you can write some code in the script to show whether it
work or not, such as
`date >> ~/test.txt`
After testing it ,you can permit the situation.