Runner task cannot find a gem

Hi -

I have a cron job that won’t work. I have installed a gem which works
fine in the app, but the cron job fails, saying:

These gems that this application depends on are missing:

  • blackbook
    Run “rake gems:install” to install them.

I think this has to do with the path, I had to add the gem path to the
top of my environment.rb file. Can someone point me in the right
direction as to how to expand your gem path for a runner job?

Thanks,
Dino

dino d. wrote:

I have a cron job that won’t work. I have installed a gem which works
fine in the app, but the cron job fails, saying:

These gems that this application depends on are missing:

  • blackbook
    Run “rake gems:install” to install them.

I think this has to do with the path, I had to add the gem path to the
top of my environment.rb file. Can someone point me in the right
direction as to how to expand your gem path for a runner job?

Try writing your crontab command as:

env GEM_HOME=/usr/local/lib/ruby/gems/1.8 /path/to/script/runner args

Or put export GEM_HOME=/usr/local/lib/ruby/gems/1.8 in either
/etc/profile or one of the user’s profile initialization files.


Rails Wheels - Find Plugins, List & Sell Plugins -
http://railswheels.com