From: Jostein Berntsen Date: 2005-03-19T08:00:31+09:00 Subject: Re: Crobjob problem with ruby script. On 18.03.05,23:24, andreas.cahen@gmail.com wrote: > Hi! > > Hopefully this is the right place to post my problem.. any help is > appreciated! > > I am using two Ruby scripts on my *inux server to purge old records out > of a mysql database. These two scripts run, or should, as cronjobs. If > I start those scripts directly from the shell it all works fine. But as > a cronjob I get the following error: > > /backups/scripts/delete_old.rb:1:in `require': No such file to load -- > dbi (LoadError) > from /backups/scripts/delete_old.rb:1 > > The command for the cron job is: ruby /backups/scripts/delete_old.rb > > Where did I go wrong? :) Are there any environement variables which I > forgot to set? > Try this instead in the crontab file: /usr/bin/ruby /backups/scripts/delete_old.rb crontab wants the full path to the ruby executable. - Jostein -- Jostein Berntsen