# Rake tells me to install gems that are already there

**URL:** <https://www.ruby-forum.com/t/rake-tells-me-to-install-gems-that-are-already-there/189861>\
**Category:** Rails\
**Created:** [June 9, 2010, 2:22am UTC](https://www.ruby-forum.com/t/rake-tells-me-to-install-gems-that-are-already-there/189861 "2010-06-09T02:22:00Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ali](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/8c91f0/32.png) [@ali](https://www.ruby-forum.com/u/ali)\
**Post date:** [June 9, 2010, 2:22am UTC](https://www.ruby-forum.com/t/rake-tells-me-to-install-gems-that-are-already-there/189861/1 "2010-06-09T02:22:00Z")

</div>

Hi, I’ve on [hostmonster.com](http://hostmonster.com) and i’ve run into a small problem that I  
just can’t get. When I push my application into my hosting environment  
and try to run rake db:migrate, I get an error message from rake  
telling me to install the missing gem my environment.rb file has:

config.gem “formtastic”  
config.gem “authlogic”

So I installed them but I still get the same error. I’ve no clue as to  
whether this is a hostmonster problem or something in a rails script  
or configuration file that I’m overlooking.

I also found a gem called gemsonrails. So I was thinking if I link my  
gems to my application, then push it onto my hosting providor, I won’t  
need to manually install gems then? Does anyone have any experience  
with gemsonrails?

Thanks

---

<div class="post-metadata">

**Author:** ![ali](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/8c91f0/32.png) [@ali](https://www.ruby-forum.com/u/ali)\
**Post date:** [June 9, 2010, 2:50am UTC](https://www.ruby-forum.com/t/rake-tells-me-to-install-gems-that-are-already-there/189861/2 "2010-06-09T02:50:06Z")

</div>

Most likely your application is looking for the gems at the server  
level rather than the user level. Here’s a KB article from  
[hostmonster.com](http://hostmonster.com) describing what you need to do:

[http://helpdesk.hostmonster.com/index.php/kb/article/000365](http://helpdesk.hostmonster.com/index.php/kb/article/000365)

Cheers,

Sheldon Finlay

---

<div class="post-metadata">

**Author:** ![ali](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/8c91f0/32.png) [@ali](https://www.ruby-forum.com/u/ali)\
**Post date:** [June 9, 2010, 4:17am UTC](https://www.ruby-forum.com/t/rake-tells-me-to-install-gems-that-are-already-there/189861/3 "2010-06-09T04:17:53Z")

</div>

Hey thanks for the heads up!

I couldn’t figure out what to put in the ENV[‘GEM\_PATH’], I tried  
ENV[‘GEM\_PATH’]  
= ‘$GEM\_HOME:/usr/lib/ruby/gems/1.8’ but I was still getting the error.

I used rake gems:unpack in my application and then pushed it onto the  
server  
and that seems to work fine. I’m a little annoyed that it wasn’t working  
more naturally with the paths and stuff though.

Cheers

---

<div class="post-metadata">

**Author:** ![ali](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/8c91f0/32.png) [@ali](https://www.ruby-forum.com/u/ali)\
**Post date:** [June 17, 2010, 4:22pm UTC](https://www.ruby-forum.com/t/rake-tells-me-to-install-gems-that-are-already-there/189861/4 "2010-06-17T16:22:17Z")

</div>

On Jun 8, 8:20 pm, Ali [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> or configuration file that I’m overlooking.

You can get this error sometimes if there’s a dependency missing (for  
formtastic or authlogic). If possible, try running ‘rake gems’ and  
look for entries that aren’t installed.

> I also found a gem called gemsonrails. So I was thinking if I link my  
> gems to my application, then push it onto my hosting providor, I won’t  
> need to manually install gems then? Does anyone have any experience  
> with gemsonrails?

Gemsonrails hasn’t been maintained for some time (late 2008) and is  
now incompatible with Rubygems 1.3.7 (gets an error when unpacking).

–Matt J.
