# Problem with "gem cleanup" on OS X 10.5

**URL:** <https://www.ruby-forum.com/t/problem-with-gem-cleanup-on-os-x-10-5/152840>\
**Category:** Ruby\
**Created:** [November 7, 2008, 11:09pm UTC](https://www.ruby-forum.com/t/problem-with-gem-cleanup-on-os-x-10-5/152840 "2008-11-07T23:09:34Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kenneth\_McDonald](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/dc4da7/32.png) [@Kenneth\_McDonald](https://www.ruby-forum.com/u/Kenneth_McDonald)\
**Post date:** [November 7, 2008, 11:09pm UTC](https://www.ruby-forum.com/t/problem-with-gem-cleanup-on-os-x-10-5/152840/1 "2008-11-07T23:09:34Z")

</div>

When I try to execute ‘sudo gem cleanup’ on OS X 10.5, I get the  
message:

Attempting to uninstall rails-1.2.6  
ERROR: While executing gem . . . (Gem:InstallError)  
Unknown gem rails = 1.2.6

How can I fix this so gem cleanup will continue to completion?

Thanks,  
Ken

---

<div class="post-metadata">

**Author:** ![Kenneth\_McDonald](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/dc4da7/32.png) [@Kenneth\_McDonald](https://www.ruby-forum.com/u/Kenneth_McDonald)\
**Post date:** [November 11, 2008, 3:45pm UTC](https://www.ruby-forum.com/t/problem-with-gem-cleanup-on-os-x-10-5/152840/2 "2008-11-11T15:45:41Z")

</div>

On Nov 7, 9:27 pm, Kenneth McDonald [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> Ken  
> I’ve been having this problem as well and I thought I was the only  
> one! I get exactly the same error on my iMac running osx 10.5.5, I’ve  
> also got xcode 3.1.1 installed in case it matters, although I should  
> mention that I’m getting this problem after a clean install of my  
> system too.

Any help is much appreciated!

Thanks.

---

<div class="post-metadata">

**Author:** ![Kenneth\_McDonald](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/dc4da7/32.png) [@Kenneth\_McDonald](https://www.ruby-forum.com/u/Kenneth_McDonald)\
**Post date:** [December 7, 2008, 8:31pm UTC](https://www.ruby-forum.com/t/problem-with-gem-cleanup-on-os-x-10-5/152840/3 "2008-12-07T20:31:07Z")

</div>

On Nov 11, 3:41 pm, Dru [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> > How can I fix this so gem cleanup will continue to completion?  
> > Any help is much appreciated!
> 
> Thanks.

I am also having exactly the same problem. No solution yet.

---

<div class="post-metadata">

**Author:** ![Kenneth\_McDonald](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/dc4da7/32.png) [@Kenneth\_McDonald](https://www.ruby-forum.com/u/Kenneth_McDonald)\
**Post date:** [December 9, 2008, 9:34pm UTC](https://www.ruby-forum.com/t/problem-with-gem-cleanup-on-os-x-10-5/152840/4 "2008-12-09T21:34:30Z")

</div>

On Dec 9, 2008, at 3:19 PM, Ryan D. wrote:

> the solution is to ignore it. those gems are installed by apple as  
> “system” gems. They stay when you run cleanup. the real error is how  
> ugly and uninformative it is about it, but apple didn’t provide  
> those patches 🙂
> 
> we’ll get to it sooner or later. (guess which one)

That doesn’t work though. You can’t ignore it - gem cleanup aborts as  
soon as it happens, leaving all the other gems left as-is.

Patrick

---

<div class="post-metadata">

**Author:** ![Kenneth\_McDonald](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/dc4da7/32.png) [@Kenneth\_McDonald](https://www.ruby-forum.com/u/Kenneth_McDonald)\
**Post date:** [December 9, 2008, 9:26pm UTC](https://www.ruby-forum.com/t/problem-with-gem-cleanup-on-os-x-10-5/152840/5 "2008-12-09T21:26:52Z")

</div>

On Dec 7, 2008, at 11:23 , cdubd wrote:

> > > ```
> > > Unknown gem rails = 1.2.6
> > > 
> > > ```
> > 
> > system too.
> > 
> > Any help is much appreciated!
> > 
> > Thanks.
> 
> I am also having exactly the same problem. No solution yet.

the solution is to ignore it. those gems are installed by apple as  
“system” gems. They stay when you run cleanup. the real error is how  
ugly and uninformative it is about it, but apple didn’t provide those  
patches 🙂

we’ll get to it sooner or later. (guess which one)

---

<div class="post-metadata">

**Author:** ![Kenneth\_McDonald](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/dc4da7/32.png) [@Kenneth\_McDonald](https://www.ruby-forum.com/u/Kenneth_McDonald)\
**Post date:** [December 10, 2008, 12:27am UTC](https://www.ruby-forum.com/t/problem-with-gem-cleanup-on-os-x-10-5/152840/6 "2008-12-10T00:27:41Z")

</div>

On Dec 9, 2008, at 12:27 , Patrick Bennett wrote:

> That doesn’t work though. You can’t ignore it - gem cleanup aborts  
> as soon as it happens, leaving all the other gems left as-is.

ah crap.

> % sudo gem cleanup  
> Password:  
> Cleaning up installed gems…  
> Attempting to uninstall rubyforge-1.0.0  
> Successfully uninstalled rubyforge-1.0.0  
> Attempting to uninstall nokogiri-1.0.5  
> Successfully uninstalled nokogiri-1.0.5  
> Attempting to uninstall sqlite3-ruby-1.2.1  
> ERROR: While executing gem … (Gem::InstallError)  
> Unknown gem sqlite3-ruby = 1.2.1

yeah. I think that is new(ish).

---

<div class="post-metadata">

**Author:** ![Kenneth\_McDonald](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/dc4da7/32.png) [@Kenneth\_McDonald](https://www.ruby-forum.com/u/Kenneth_McDonald)\
**Post date:** [December 31, 2008, 10:31pm UTC](https://www.ruby-forum.com/t/problem-with-gem-cleanup-on-os-x-10-5/152840/7 "2008-12-31T22:31:46Z")

</div>

Ken McDonald wrote:

> When I try to execute ‘sudo gem cleanup’ on OS X 10.5, I get the  
> message:
> 
> Attempting to uninstall rails-1.2.6  
> ERROR: While executing gem . . . (Gem:InstallError)  
> Unknown gem rails = 1.2.6
> 
> How can I fix this so gem cleanup will continue to completion?

You can search for the offending gem with

%gem list -d sqlite3

On OS X you will get back something akin to

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

sqlite3-ruby (1.2.4, 1.2.1)  
Author: Jamis B.  
Homepage: [http://sqlite-ruby.rubyforge.org/sqlite3](http://sqlite-ruby.rubyforge.org/sqlite3)  
Installed at (1.2.4): /Library/Ruby/Gems/1.8  
(1.2.1):  
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8

```
SQLite3/Ruby is a module to allow Ruby scripts to interface with a
SQLite3 database.

```

You may now uninstall the offending gem with

%gem uninstall --install-dir  
System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8  
sqlite3

So, in general

gem list -d

will get you the location of the gem, and

gem uninstall --install-dir \</install/directory\>

will uninstall the gem.

HTH

Charles
