# Runner task cannot find a gem

**URL:** <https://www.ruby-forum.com/t/runner-task-cannot-find-a-gem/149787>\
**Category:** Rails\
**Created:** [September 29, 2008, 9:29pm UTC](https://www.ruby-forum.com/t/runner-task-cannot-find-a-gem/149787 "2008-09-29T21:29:36Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![dino\_d](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/b5ac83/32.png) [@dino\_d](https://www.ruby-forum.com/u/dino_d)\
**Post date:** [September 29, 2008, 9:29pm UTC](https://www.ruby-forum.com/t/runner-task-cannot-find-a-gem/149787/1 "2008-09-29T21:29:36Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![dino\_d](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/b5ac83/32.png) [@dino\_d](https://www.ruby-forum.com/u/dino_d)\
**Post date:** [September 30, 2008, 2:56am UTC](https://www.ruby-forum.com/t/runner-task-cannot-find-a-gem/149787/2 "2008-09-30T02:56:00Z")

</div>

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](http://railswheels.com)
