# I get â€œMissing these required gemsâ€, but gems are installed

**URL:** <https://www.ruby-forum.com/t/i-get-a-oemissing-these-required-gemsa-but-gems-are-installed/160338>\
**Category:** Rails\
**Created:** [February 14, 2009, 9:44pm UTC](https://www.ruby-forum.com/t/i-get-a-oemissing-these-required-gemsa-but-gems-are-installed/160338 "2009-02-14T21:44:17Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![collimarco](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/ecb155/32.png) [@collimarco](https://www.ruby-forum.com/u/collimarco)\
**Post date:** [February 14, 2009, 9:44pm UTC](https://www.ruby-forum.com/t/i-get-a-oemissing-these-required-gemsa-but-gems-are-installed/160338/1 "2009-02-14T21:44:17Z")

</div>

Hi,

since I updated ruby using Mac Ports (on Leopard) I have got several  
problems and I also had to reinstall gems. Now when I run Mongrel I keep  
getting the error “Missing these required gems” followed by the list of  
gems that I required in environment.rb but that gems seems to be  
correctly installed as I see running gem list.  
I think that rails is looking for a previous installation, but I don’t  
know how to configure it to use the new ruby/gem path.

Thanks in advance!

---

<div class="post-metadata">

**Author:** ![collimarco](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/ecb155/32.png) [@collimarco](https://www.ruby-forum.com/u/collimarco)\
**Post date:** [February 15, 2009, 5:36am UTC](https://www.ruby-forum.com/t/i-get-a-oemissing-these-required-gemsa-but-gems-are-installed/160338/2 "2009-02-15T05:36:33Z")

</div>

Gems might be installed in more than one area.

Look in ~/.gems and make sure that you use sudo when installing gems.

Do you now have multiple ruby directories on your mac? if so you most  
likely have multiple gems directories too…

what I found was best when I upgraded from 1.8.6 to 1.8.7 was to  
remove all gems directories and start empty. I can’t remember what the  
issue was but it was a path issue or something like that.

---

<div class="post-metadata">

**Author:** ![collimarco](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/ecb155/32.png) [@collimarco](https://www.ruby-forum.com/u/collimarco)\
**Post date:** [February 15, 2009, 1:32pm UTC](https://www.ruby-forum.com/t/i-get-a-oemissing-these-required-gemsa-but-gems-are-installed/160338/3 "2009-02-15T13:32:57Z")

</div>

Freddy A. wrote:

> Gems might be installed in more than one area.

I agree…

> Look in ~/.gems and make sure that you use sudo when installing gems.

Unfortunately I haven’t got any ~/.gems directory

> Do you now have multiple ruby directories on your mac? if so you most  
> likely have multiple gems directories too…

When I upgraded from 1.8.6 to 1.8.7 I used MacPorts and I found out that  
I had two versions of Ruby, but the first installation was then removed  
(I think so).

> what I found was best when I upgraded from 1.8.6 to 1.8.7 was to  
> remove all gems directories and start empty. I can’t remember what the  
> issue was but it was a path issue or something like that.

$ which ruby  
/opt/local/bin/ruby  
$ which gem  
/opt/local/bin/gem

---

<div class="post-metadata">

**Author:** ![collimarco](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/ecb155/32.png) [@collimarco](https://www.ruby-forum.com/u/collimarco)\
**Post date:** [February 15, 2009, 8:32pm UTC](https://www.ruby-forum.com/t/i-get-a-oemissing-these-required-gemsa-but-gems-are-installed/160338/4 "2009-02-15T20:32:14Z")

</div>

Oops… I’ve resolved. The problem wasn’t related to ruby path: when I  
set environment.rb I forgot to specify the :lib parameter for some  
gems.

Sorry
