Matthew L. wrote:
I’m trying to get a ruby script run into a crontab and it keeps failing
saying it can’t find my mechanize gem. When I run the script form the
command line, everything runs fine and I don’t get any failures.
Anyone ever had that problem before?
Try getting it to run from the command line with a blank
environment with ‘env -’, e.g.,
% env - run_stuff.sh
Typically a crontab job runs with a much reduced environment.
Alternatively, stick a printenv in your crontab to see
what environment it is working with and compare to your
You might also find crontab’s sister command, ‘at’, helpful
to get tighter feedback cycles.