# Gems disapeared after port install of a package

**URL:** <https://www.ruby-forum.com/t/gems-disapeared-after-port-install-of-a-package/147124>\
**Category:** Ruby\
**Created:** [August 28, 2008, 4:49pm UTC](https://www.ruby-forum.com/t/gems-disapeared-after-port-install-of-a-package/147124 "2008-08-28T16:49:41Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![tomtoday](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/35a633/32.png) [@tomtoday](https://www.ruby-forum.com/u/tomtoday)\
**Post date:** [August 28, 2008, 4:49pm UTC](https://www.ruby-forum.com/t/gems-disapeared-after-port-install-of-a-package/147124/1 "2008-08-28T16:49:41Z")

</div>

Hi,  
I am new to Mac, tried to set up MSSQL connection  
and broke gems on Leopard.

tb-imac:~ tb$ irb  
irb(main):001:0\> require ‘rubygems’  
LoadError: no such file to load – rubygems  
from (irb):1:in `require' from (irb):1 irb(main):002:0> require 'hpricot' LoadError: no such file to load -- hpricot from (irb):2:in`require’  
from (irb):2  
irb(main):003:0\> quit

tb-imac:~ tb$ gem list --local

\*\*\* LOCAL GEMS \*\*\*

actionmailer (2.1.0, 1.3.6)  
actionpack (2.1.0, 1.13.6)  
actionwebservice (1.2.6)  
activerecord (2.1.0, 1.15.6)  
activerecord-sqlserver-adapter (1.0.0.9250)  
activeresource (2.1.0)  
activesupport (2.1.0, 1.4.4)  
…

I think this command broke it:  
sudo port install rb-dbi +dbd\_odbc

is it possible? How to debig the source of the problem?

Cheers,  
Tomasz

---

<div class="post-metadata">

**Author:** ![tomtoday](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/35a633/32.png) [@tomtoday](https://www.ruby-forum.com/u/tomtoday)\
**Post date:** [August 28, 2008, 5:42pm UTC](https://www.ruby-forum.com/t/gems-disapeared-after-port-install-of-a-package/147124/2 "2008-08-28T17:42:48Z")

</div>

On 28 Aug 2008, at 15:44, Tom Bak wrote:

> I think this command broke it:  
> sudo port install rb-dbi +dbd\_odbc

> is it possible? How to debig the source of the problem?

Have you ended up with two different installs of ruby (I imagine port  
would have grabbed ruby as a dependency of rb-dbi) ?

Do  
which gem  
which irb

point to very different places ?

Fred

---

<div class="post-metadata">

**Author:** ![tomtoday](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/35a633/32.png) [@tomtoday](https://www.ruby-forum.com/u/tomtoday)\
**Post date:** [August 28, 2008, 8:56pm UTC](https://www.ruby-forum.com/t/gems-disapeared-after-port-install-of-a-package/147124/3 "2008-08-28T20:56:41Z")

</div>

Frederick C. wrote:

> On 28 Aug 2008, at 15:44, Tom Bak wrote:
> 
> > I think this command broke it:  
> > sudo port install rb-dbi +dbd\_odbc
> 
> > is it possible? How to debig the source of the problem?
> 
> Have you ended up with two different installs of ruby (I imagine port  
> would have grabbed ruby as a dependency of rb-dbi) ?
> 
> Do  
> which gem  
> which irb
> 
> point to very different places ?

Yes, indeed. gem is in /user/bin while irb is in /opt/local/bin/irb

How to remove that not wanted version of ruby? Delete file by file?  
Or maybe the ports can cliean up that mess after that install somehow?

Cheers,  
Tomasz

---

<div class="post-metadata">

**Author:** ![tomtoday](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/35a633/32.png) [@tomtoday](https://www.ruby-forum.com/u/tomtoday)\
**Post date:** [August 29, 2008, 10:23pm UTC](https://www.ruby-forum.com/t/gems-disapeared-after-port-install-of-a-package/147124/4 "2008-08-29T22:23:28Z")

</div>

Tom Bak wrote:

> Frederick C. wrote:
> 
> > On 28 Aug 2008, at 15:44, Tom Bak wrote:
> > 
> > > I think this command broke it:  
> > > sudo port install rb-dbi +dbd\_odbc
> > 
> > > is it possible? How to debig the source of the problem?
> > 
> > Have you ended up with two different installs of ruby (I imagine port  
> > would have grabbed ruby as a dependency of rb-dbi) ?
> > 
> > Do  
> > which gem  
> > which irb
> > 
> > point to very different places ?
> 
> Yes, indeed. gem is in /user/bin while irb is in /opt/local/bin/irb
> 
> How to remove that not wanted version of ruby? Delete file by file?  
> Or maybe the ports can cliean up that mess after that install somehow?

sudo port -uf uninstall ruby

Helped 🙂

Cheers,  
Tomasz
