problem with ruby installation

Discussion in 'Ruby' started by Sean Cahoon, Oct 3, 2007.

  1. Sean Cahoon

    Sean Cahoon Guest

    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/.
     
    Sean Cahoon, Oct 3, 2007
    #1
    1. Advertising

  2. Sean Cahoon

    Ari Brown Guest

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

    --------------------------------------------|
    If you're not living on the edge,
    then you're just wasting space.
     
    Ari Brown, Oct 3, 2007
    #2
    1. Advertising

  3. Sean Cahoon

    Sean Cahoon Guest

    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/.
     
    Sean Cahoon, Oct 3, 2007
    #3
  4. Sean Cahoon

    John Joyce Guest

    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?

    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.
     
    John Joyce, Oct 3, 2007
    #4
  5. On 10/2/07, 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.

    --
    Rick DeNatale

    My blog on Ruby
    http://talklikeaduck.denhaven2.com/
     
    Rick DeNatale, Oct 3, 2007
    #5
  6. Sean Cahoon

    John Joyce Guest

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

    > On 10/2/07, 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.

    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 !
     
    John Joyce, Oct 3, 2007
    #6
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Ihab Mentiady

    Ruby installation problem on UNIX

    Ihab Mentiady, Aug 5, 2003, in forum: Ruby
    Replies:
    2
    Views:
    144
    Kero van Gelder
    Aug 7, 2003
  2. Alexey Verkhovsky
    Replies:
    1
    Views:
    233
    WATANABE Hirofumi
    Oct 5, 2004
  3. Wolfgang Nádasi-Donner

    Ruby 1.9 mswin32 Installation and a Problem

    Wolfgang Nádasi-Donner, Jul 22, 2005, in forum: Ruby
    Replies:
    2
    Views:
    101
    Wolfgang Nádasi-Donner
    Jul 22, 2005
  4. Replies:
    1
    Views:
    180
    Ken Bloom
    May 28, 2007
  5. YAG
    Replies:
    2
    Views:
    168
    Ron Fox
    Apr 4, 2008
Loading...

Share This Page