Two Installations of Ruby

Discussion in 'Ruby' started by highlyjhi, May 22, 2007.

  1. highlyjhi

    highlyjhi Guest

    I'm running Mac OS 10.4.9 with Ruby 1.8.2 installed by default. I
    updated to 1.8.6 but I installed it in /Users/jeremy/bin instead of
    the default /usr/bin/ So when I go to "ruby -v" it still says 1.8.2.
    How do i either move ruby into the correct directory or how do I
    change the path to ruby to the new directory? I'd prefer to move
    1.8.6 to a different spot outside of my home directory.

    Thanks,
    Jer
     
    highlyjhi, May 22, 2007
    #1
    1. Advertising

  2. highlyjhi

    highlyjhi Guest

    Great! But when I close Terminal it's back to the default. How do I
    keep this way?

    On May 22, 2007, at 1:59 PM, Fred Phillips wrote:

    > Type this into terminal:
    > export PATH=/Users/jeremy/bin:$PATH
    >
    > On 22/05/07, highlyjhi <> wrote:
    >>
    >> I'm running Mac OS 10.4.9 with Ruby 1.8.2 installed by default. I
    >> updated to 1.8.6 but I installed it in /Users/jeremy/bin instead of
    >> the default /usr/bin/ So when I go to "ruby -v" it still says 1.8.2.
    >> How do i either move ruby into the correct directory or how do I
    >> change the path to ruby to the new directory? I'd prefer to move
    >> 1.8.6 to a different spot outside of my home directory.
    >>
    >> Thanks,
    >> Jer
    >>
    >>
     
    highlyjhi, May 22, 2007
    #2
    1. Advertising

  3. Fred Phillips wrote:
    > Ah right, forgot about that. edit your ~/bashrc file to read:
    >
    > PATH=PATH=/Users/jeremy/bin:$PATH


    Two things: a) It'd have to be export PATH=/Users/jeremy/bin:$PATH
    b) bash isn't the default shell on OSX, so he'd have to put it into the
    ~/.tcshrc or whatever shell he's using.

    HTH,
    Sebastian
    --
    Ist so, weil ist so
    Bleibt so, weil war so
     
    Sebastian Hungerecker, May 22, 2007
    #3
  4. On 5/22/07, Sebastian Hungerecker <> wrote:

    > b) bash isn't the default shell on OSX, so he'd have to put it into the
    > ~/.tcshrc or whatever shell he's using.


    Um... Maybe in 10.1 or 10.2, but it's been default 10.3 on up, IIRC
     
    Gregory Brown, May 22, 2007
    #4
  5. Gregory Brown wrote:
    > On 5/22/07, Sebastian Hungerecker <> wrote:


    > > b) bash isn't the default shell on OSX, so he'd have to put it into the
    > > ~/.tcshrc or whatever shell he's using.

    >
    > Um... Maybe in 10.1 or 10.2, but it's been default 10.3 on up, IIRC


    Oh, my knowledge must be out of date then. Sorry for spreading misinformation.


    --
    Ist so, weil ist so
    Bleibt so, weil war so
     
    Sebastian Hungerecker, May 22, 2007
    #5
  6. highlyjhi

    highlyjhi Guest

    Is it possible to install the new version of Ruby over the old on OS X?
     
    highlyjhi, May 22, 2007
    #6
  7. highlyjhi

    Tim Hunter Guest

    highlyjhi wrote:
    > Is it possible to install the new version of Ruby over the old on OS X?
    >

    Yes, but you probably don't want to.

    If you let the ./configure script use the default --prefix, Ruby will
    get installed in /usr/local. Then all you have to do is add /usr/local
    to your PATH in your ~/.profile file in front of the default PATH, like
    this:

    export PATH=/usr/local:$PATH

    You can read about PATH and .profile by entering

    man bash

    in a Terminal window, or just Google it.

    --
    RMagick [http://rmagick.rubyforge.org]
    RMagick Installation FAQ [http://rmagick.rubyforge.org/install-faq.html]
     
    Tim Hunter, May 22, 2007
    #7
    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. Mike O'Donnell
    Replies:
    0
    Views:
    596
    Mike O'Donnell
    Nov 19, 2003
  2. Antoine
    Replies:
    0
    Views:
    413
    Antoine
    Dec 14, 2004
  3. Replies:
    3
    Views:
    465
    Spartanicus
    Dec 24, 2003
  4. Carl Youngblood
    Replies:
    12
    Views:
    190
    Charles Hixson
    Oct 14, 2004
  5. Alex Rice
    Replies:
    6
    Views:
    165
    Alex Rice
    Dec 28, 2009
Loading...

Share This Page