Problem with ruby installation

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.

···

--
Posted via http://www.ruby-forum.com/.

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 :smiley:

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

···

On Oct 2, 2007, at 10:04 PM, Sean Cahoon 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?

···

--
Posted via http://www.ruby-forum.com/.

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.

···

On Oct 2, 2007, at 9:49 PM, Sean Cahoon 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

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.

···

On 10/2/07, Sean Cahoon <seancolquhoun@gk-a.com> 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?

--
Rick DeNatale

My blog on Ruby
http://talklikeaduck.denhaven2.com/

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 !

···

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

On 10/2/07, Sean Cahoon <seancolquhoun@gk-a.com> 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

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.