Setting up a cron script to use
rake on DreamHost is fairly tricky.
Most cron implementations run the command under a limited environment compared to your usual log in. Every time my cron script was supposed to run, I would get a happy little email stating,
The eventual solution I discovered is to make sure you set the
$GEM_PATH environment variables in the script.
You should probably also make sure you use full paths to commands.
I wound up with this:
You can get the environment variable values by running the
env command in your SSH terminal. Use the
which bundle and
which rake commands to get the full paths to the
With a little more experimenting, you might be able to pare down some of that extraneous setup.