# Upgrade on OS X

**URL:** <https://www.ruby-forum.com/t/upgrade-on-os-x/73920>\
**Category:** Ruby\
**Created:** [October 28, 2006, 12:56am UTC](https://www.ruby-forum.com/t/upgrade-on-os-x/73920 "2006-10-28T00:56:44Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tim\_McIntyre](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/7bcc69/32.png) [@Tim\_McIntyre](https://www.ruby-forum.com/u/Tim_McIntyre)\
**Post date:** [October 28, 2006, 12:56am UTC](https://www.ruby-forum.com/t/upgrade-on-os-x/73920/1 "2006-10-28T00:56:44Z")

</div>

Hey all,

Wasn’t sure if this should go to the ruby or rails list but here we  
are…

I’ve been running OS X (10.8.4) with the packaged ruby (1.8.2) and  
rails for some time, no problems. I decided to test out mongrel but  
that requires \>= 1.8.4 so I grabbed the 1.8.5 source, built that then  
modified my path and all good… up and running.

The problem is all my gems are gone. Well they’re not gone of course  
but “gem list --local” shows nothing and, of course, nothing that  
depends on them works. I’ve looked around a good bit but haven’t  
seen anything about this.

Any ideas on why this is?

Thanks in advance!  
Tim

Be who you are and say what you feel, because those who mind don’t  
matter and those who matter don’t mind.

- Dr. Seuss

---

<div class="post-metadata">

**Author:** ![Tim\_McIntyre](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/7bcc69/32.png) [@Tim\_McIntyre](https://www.ruby-forum.com/u/Tim_McIntyre)\
**Post date:** [October 28, 2006, 2:29pm UTC](https://www.ruby-forum.com/t/upgrade-on-os-x/73920/2 "2006-10-28T14:29:16Z")

</div>

On 27-Oct-06, at 6:56 PM, Tim McIntyre wrote:

> The problem is all my gems are gone. Well they’re not gone of  
> course but “gem list --local” shows nothing and, of course, nothing  
> that depends on them works. I’ve looked around a good bit but  
> haven’t seen anything about this.
> 
> Any ideas on why this is?

The ruby as shipped by apple is not in the same place on disk as the  
1.8.5 distribution you built. In my case 1.8.5 is in /usr/local/…  
and so the gems are in /usr/local/lib/ruby/gems/1.8/gems/ – your  
gems won’t be there.

You can set the GEM\_HOME environment variable, or re-install your  
gems. I re-installed.

BTW, if you are using gcc4 as shipped by Apple, you should re-compile  
with -O or -O1 rather than -O2, or use gcc3 – with -O2 you will get  
strange heap problems after running ruby for a while.

Cheers,  
Bob

> 

* * *

Bob H. – blogs at \<[http://www.recursive.ca/](http://www.recursive.ca/)  
hutch/\>  
Recursive Design Inc. – [http://www.recursive.ca/](http://www.recursive.ca/)  
Raconteur – [http://www.raconteur.info/](http://www.raconteur.info/)  
xampl for Ruby – [http://rubyforge.org/projects/xampl/](http://rubyforge.org/projects/xampl/)

---

<div class="post-metadata">

**Author:** ![Tim\_McIntyre](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/7bcc69/32.png) [@Tim\_McIntyre](https://www.ruby-forum.com/u/Tim_McIntyre)\
**Post date:** [October 28, 2006, 9:03pm UTC](https://www.ruby-forum.com/t/upgrade-on-os-x/73920/3 "2006-10-28T21:03:50Z")

</div>

Bob H. wrote:

> BTW, if you are using gcc4 as shipped by Apple, you should re-compile  
> with -O or -O1 rather than -O2, or use gcc3 – with -O2 you will get  
> strange heap problems after running ruby for a while.

Has a bug been filed on this? Is it unique to Macs, or will any gcc 4  
show it?

I run Gentoo Linux, Ruby 1.8.5 and gcc 4.1.1. If there are “strange heap  
problems”, I’d like to be able to reproduce them and get them fixed!

---

<div class="post-metadata">

**Author:** ![Tim\_McIntyre](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/7bcc69/32.png) [@Tim\_McIntyre](https://www.ruby-forum.com/u/Tim_McIntyre)\
**Post date:** [October 29, 2006, 9:27pm UTC](https://www.ruby-forum.com/t/upgrade-on-os-x/73920/4 "2006-10-29T21:27:47Z")

</div>

On Oct 28, 2006, at 5:28 AM, Bob H. wrote:

> You can set the GEM\_HOME environment variable, or re-install your  
> gems. I re-installed.

Just in case this is of use to anyone else it’s actually GEM\_PATH  
that needs to be modified.

Tim

Be who you are and say what you feel, because those who mind don’t  
matter and those who matter don’t mind.

- Dr. Seuss

---

<div class="post-metadata">

**Author:** ![Tim\_McIntyre](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/7bcc69/32.png) [@Tim\_McIntyre](https://www.ruby-forum.com/u/Tim_McIntyre)\
**Post date:** [October 29, 2006, 3:51pm UTC](https://www.ruby-forum.com/t/upgrade-on-os-x/73920/5 "2006-10-29T15:51:04Z")

</div>

On 28-Oct-06, at 3:01 PM, M. Edward (Ed) Borasky wrote:

> Bob H. wrote:
> 
> > BTW, if you are using gcc4 as shipped by Apple, you should re-compile  
> > with -O or -O1 rather than -O2, or use gcc3 – with -O2 you will get  
> > strange heap problems after running ruby for a while.
> 
> Has a bug been filed on this? Is it unique to Macs, or will any gcc 4  
> show it?

Yes, it is ‘well’ known to apple and the GNU folks. My understanding  
is that it was fixed in the very early days of gcc4 but after Apple  
took their snapshot (gcc 4.0.1). There hasn’t been a patch, at least  
I’m not aware of a patch. It shouldn’t affect anyone running on linux  
anymore (it doesn’t affect me on linux).

The bug shows up after a few hours to several days of ruby running.  
It apparently either won’t or is _very_ unlikely to occur in programs  
running for less time than that (most ruby programs do not run that  
long, I’m running a Rails in Mongrel application that never stops).

Here is a thread that I started last April: \<http://  
blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/189287\>. There  
are links in that thread to more information about the problem.

Cheers,  
Bob

> I run Gentoo Linux, Ruby 1.8.5 and gcc 4.1.1. If there are “strange  
> heap  
> problems”, I’d like to be able to reproduce them and get them fixed!

* * *

Bob H. – blogs at \<[http://www.recursive.ca/](http://www.recursive.ca/)  
hutch/\>  
Recursive Design Inc. – [http://www.recursive.ca/](http://www.recursive.ca/)  
Raconteur – [http://www.raconteur.info/](http://www.raconteur.info/)  
xampl for Ruby – [http://rubyforge.org/projects/xampl/](http://rubyforge.org/projects/xampl/)
