# Problem with ruby installation

**URL:** <https://www.ruby-forum.com/t/problem-with-ruby-installation/116168>\
**Category:** Ruby\
**Created:** [October 3, 2007, 4:04am UTC](https://www.ruby-forum.com/t/problem-with-ruby-installation/116168 "2007-10-03T04:04:14Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![smc7000](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/ed655f/32.png) [@smc7000](https://www.ruby-forum.com/u/smc7000)\
**Post date:** [October 3, 2007, 4:04am UTC](https://www.ruby-forum.com/t/problem-with-ruby-installation/116168/1 "2007-10-03T04:04:14Z")

</div>

Hi everybody. This is my first posting. I have a problem. My computer is  
balking whenever I try to install something using gem install (Mac OS X  
10.3 PPC) and giving me this error:

ERROR: While executing gem … (NoMethodError)  
undefined method `refresh’ for #Hash:0x1107ff4

So I did some googling and found this answer:

I am getting this error a lot now too. I have not run it  
down, but it is usually quickly fixed by deleting source\_cache  
in lib/ruby/gems/1.8/source\_cache.

However, when I go to /usr/lib/ruby/, I only see version 1.6, which I  
updated from ages ago. I can’t find the current version of ruby, which i  
checked and found to be 1.8.4.

Anybody know where ruby 1.8 is installed? I’ve been all over my  
filesystem and I can’t find another lib/ruby.

---

<div class="post-metadata">

**Author:** ![smc7000](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/ed655f/32.png) [@smc7000](https://www.ruby-forum.com/u/smc7000)\
**Post date:** [October 3, 2007, 4:41am UTC](https://www.ruby-forum.com/t/problem-with-ruby-installation/116168/2 "2007-10-03T04:41:40Z")

</div>

On Oct 2, 2007, at 10:04 PM, Sean C. wrote:

Can’t answer your first question but…

> Anybody know where ruby 1.8 is installed? I’ve been all over my  
> filesystem and I can’t find another lib/ruby.

try /usr/local/lib/ruby 😃

--------------------------------------------|  
If you’re not living on the edge,  
then you’re just wasting space.

---

<div class="post-metadata">

**Author:** ![smc7000](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/ed655f/32.png) [@smc7000](https://www.ruby-forum.com/u/smc7000)\
**Post date:** [October 3, 2007, 4:49am UTC](https://www.ruby-forum.com/t/problem-with-ruby-installation/116168/3 "2007-10-03T04:49:16Z")

</div>

Thanks! That did the trick. But what’s the difference between usr/lib  
and usr/local/lib? What is the local directory supposed to be for?

---

<div class="post-metadata">

**Author:** ![smc7000](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/ed655f/32.png) [@smc7000](https://www.ruby-forum.com/u/smc7000)\
**Post date:** [October 3, 2007, 7:05am UTC](https://www.ruby-forum.com/t/problem-with-ruby-installation/116168/4 "2007-10-03T07:05:23Z")

</div>

On Oct 2, 2007, at 9:49 PM, Sean C. wrote:

> Thanks! That did the trick. But what’s the difference between usr/lib  
> and usr/local/lib? What is the local directory supposed to be for?  
> It’s like scope.

Welcome to Unix.  
Get a good book on Unix (unix in a nutshell is a good reference…but  
reference only)  
There are many good ones, just get one that addresses OS X, Linux,  
and Unix, because sometimes there are important little differences to  
know about.

It’ll come in handy and make life much easier.

anyway, \*nix’s all tend to follow a similar directory structure. (but  
not always)  
It’s all about putting things where they go.  
usr/lib is basically stuff accessible to all users.  
usr/local and anything in it is for that user only. Your own private  
play pen.

---

<div class="post-metadata">

**Author:** ![smc7000](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/ed655f/32.png) [@smc7000](https://www.ruby-forum.com/u/smc7000)\
**Post date:** [October 3, 2007, 2:25pm UTC](https://www.ruby-forum.com/t/problem-with-ruby-installation/116168/5 "2007-10-03T14:25:12Z")

</div>

On 10/2/07, Sean C. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Thanks! That did the trick. But what’s the difference between usr/lib  
> and usr/local/lib? What is the local directory supposed to be for?

Brief answer

It’s to separate code which you’ve installed to customize your system  
from the ‘stock’ installed code. Updating the system won’t touch it.

Possibly boring expansion

There’s a standard called the Filesystem Hierarchy Standard or FHS  
which maps out how POSIX filesystems are ‘supposed’ to be laid out.  
Various \*nix and \*nix-like systems follow this standard to varying  
degrees. OSX follows it less than, say debian linux, but the concepts  
of FHS are still instructive. Actually in some ways it might be more  
accurate to say that the different distributions interpret the FHS  
somewhat differently. From a ruby point of view, debians particular  
interpretation of the FHS is why debian isn’t completely comfortable  
with gems [http://pkg-ruby-extras.alioth.debian.org/rubygems.html](http://pkg-ruby-extras.alioth.debian.org/rubygems.html)

You might find other \*\*/local directories and they probably serve the  
same purpose.

And on OSX (which I’m just learning\*) I’ve found less consistency in  
where software is installed compared to my debian/ubuntu systems. For  
example some of the software I’ve installed got put in /usr/local by  
default and other sw went to /opt/local

- I’d been away from the Mac for some time (my last Mac ran OS 8.x).  
OSX feels like a foreign beast when I look at it from my old Mac  
experience, so many things have changed. I’m finding that my linux  
experience is much more useful in adapting.

–  
Rick DeNatale

My blog on Ruby  
[http://talklikeaduck.denhaven2.com/](http://talklikeaduck.denhaven2.com/)

---

<div class="post-metadata">

**Author:** ![smc7000](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/ed655f/32.png) [@smc7000](https://www.ruby-forum.com/u/smc7000)\
**Post date:** [October 3, 2007, 5:44pm UTC](https://www.ruby-forum.com/t/problem-with-ruby-installation/116168/6 "2007-10-03T17:44:00Z")

</div>

On Oct 3, 2007, at 7:24 AM, Rick DeNatale wrote:

> You might find other \*\*/local directories and they probably serve the  
> experience is much more useful in adapting.  
> Rick, opt is the MacPorts ( formerly DarwinPorts ) directory.  
> It’s the apt-get for OS X. It’s not a default directory. MacPorts  
> doesn’t come with OS X.  
> Most stuff you compile and install will by default in the makefile  
> get put in the standard directories.  
> Just always be careful, some people like futz the PATH variable by  
> adding a different dot file. So after installing (say… Python  
> stuff? ) You always need to check your home directory for any new dot  
> files or changes to your PATH.  
> Their logic is sensible from one angle: they go with the OS X default  
> path.  
> Their logic is bad from another angle: they don’t respect the path  
> set by the user!  
> In the last few months I’ve seen people have this same path trouble  
> many times after installing something.

Another option is to read the make file, but those things can be  
pretty long and hairy, but if the README isn’t helpful, it’s Russian  
Roullette…

Bottom line is: getting familiar with unixy stuff is a very good  
idea, and is not so painful as it seems at first. Most of it carries  
over to other \*nix’s !
