Help! Window user needs help installing ruby 1.9 on mac

Discussion in 'Ruby' started by Zayd Connor, Apr 4, 2009.

  1. Zayd Connor

    Zayd Connor Guest

    I just purchased a new macbook pro and would like to install ruby 1.9,
    but I'm having trouble installing, can someone please provide the
    easiest steps to install ruby 1.9 please?

    Thanks
    --
    Posted via http://www.ruby-forum.com/.
    Zayd Connor, Apr 4, 2009
    #1
    1. Advertising

  2. Zayd Connor

    Ben Lovell Guest

    [Note: parts of this message were removed to make it a legal post.]

    Install macports. Then:
    sudo port install ruby19

    Should do it.

    Ben

    On Sat, Apr 4, 2009 at 6:55 AM, Zayd Connor <> wrote:

    > I just purchased a new macbook pro and would like to install ruby 1.9,
    > but I'm having trouble installing, can someone please provide the
    > easiest steps to install ruby 1.9 please?
    >
    > Thanks
    > --
    > Posted via http://www.ruby-forum.com/.
    >
    >
    Ben Lovell, Apr 4, 2009
    #2
    1. Advertising

  3. Zayd Connor

    Zayd Connor Guest

    Ben Lovell wrote:
    > Install macports. Then:
    > sudo port install ruby19
    >
    > Should do it.
    >
    > Ben


    Thanks Ben, that helped a great deal, 1.9 is installed successfully on
    my machine.

    Kindest Regards
    --
    Posted via http://www.ruby-forum.com/.
    Zayd Connor, Apr 4, 2009
    #3
  4. Zayd Connor

    Ben Lovell Guest

    [Note: parts of this message were removed to make it a legal post.]

    Great. You'll find macports pretty handy for installing many things.

    On Sat, Apr 4, 2009 at 4:31 PM, Zayd Connor <> wrote:

    > Ben Lovell wrote:
    > > Install macports. Then:
    > > sudo port install ruby19
    > >
    > > Should do it.
    > >
    > > Ben

    >
    > Thanks Ben, that helped a great deal, 1.9 is installed successfully on
    > my machine.
    >
    > Kindest Regards
    > --
    > Posted via http://www.ruby-forum.com/.
    >
    >
    Ben Lovell, Apr 4, 2009
    #4
  5. Zayd Connor

    Zayd Connor Guest

    Ben Lovell wrote:
    > Great. You'll find macports pretty handy for installing many things.


    Cool. One thing I'm noticing is when I type /usr/bin/ruby -v it is
    giving me version 1.8, when I'm compiling my code how do I know which
    version of ruby I'm using? 1.9 is installed in my /opt/local/lib
    directory.
    Should I uninstall 1.8?

    Thanks
    --
    Posted via http://www.ruby-forum.com/.
    Zayd Connor, Apr 4, 2009
    #5
  6. Zayd Connor

    Ben Lovell Guest

    [Note: parts of this message were removed to make it a legal post.]

    On Sat, Apr 4, 2009 at 5:32 PM, Zayd Connor <> wrote:

    >
    > Cool. One thing I'm noticing is when I type /usr/bin/ruby -v it is
    > giving me version 1.8, when I'm compiling my code how do I know which
    > version of ruby I'm using? 1.9 is installed in my /opt/local/lib
    > directory.
    > Should I uninstall 1.8?
    >


    Take a look at this article:

    http://www.metaskills.net/2009/1/20/multiruby-the-macports-way-testing-your-rails-apps-with-ruby-1-9

    Although it is a little hackish I'm not sure of any easier method.

    Ben
    Ben Lovell, Apr 4, 2009
    #6
  7. Zayd Connor

    Dom Guest

    On Apr 4, 2009, at 12:32 PM, Zayd Connor wrote:

    > Ben Lovell wrote:
    >> Great. You'll find macports pretty handy for installing many things.

    >
    > Cool. One thing I'm noticing is when I type /usr/bin/ruby -v it is
    > giving me version 1.8, when I'm compiling my code how do I know which
    > version of ruby I'm using? 1.9 is installed in my /opt/local/lib


    at the prompt, type which ruby <return> and that will give you the
    path to the executable

    also, you might want to check your PATH env variable to make sure it's
    finding the right one first, although I think OSX has a mechanism for
    switching that's kind of a half baked version of the Linux
    alternatives mechanism for switching between various versions of
    "stuff". Although, in fairness this seems to work quite well for java
    on the mac. Anyway, check your path with either echo $PATH of env
    commands and see what it says. You may have to force it by modifying
    the path in .bash_profile in your home directory (assuming bash) or
    some other file that's modifying your path variable. Hope that helps.
    >
    > directory.
    > Should I uninstall 1.8?
    >
    > Thanks
    > --
    > Posted via http://www.ruby-forum.com/.
    >
    Dom, Apr 4, 2009
    #7
  8. On Sat, Apr 4, 2009 at 9:49 AM, Ben Lovell <> wrote:

    > Although it is a little hackish I'm not sure of any easier method.


    I always install alternative versions of any software into different
    directories, e.g.
    /usr/local/ruby-1.8.6
    /usr/local/ruby-1.8.7
    /usr/local/ruby-1.9.1

    set the default path in your .bashrc.local or equiv, and then use a
    file like, say "r187"
    ------------
    export RUBY_HOME=/usr/local/ruby-1.8.7
    export PATH=$RUBY_HOME/bin:$PATH
    ------------
    for each version. Then in any window you can type
    prompt> . r187

    and set the version for that particular shell.

    FWIW,
    --
    Hassan Schroeder ------------------------
    Hassan Schroeder, Apr 4, 2009
    #8
  9. Zayd Connor

    Zayd Connor Guest

    Dom wrote:
    > On Apr 4, 2009, at 12:32 PM, Zayd Connor wrote:
    >
    >> Ben Lovell wrote:
    >>> Great. You'll find macports pretty handy for installing many things.

    >>
    >> Cool. One thing I'm noticing is when I type /usr/bin/ruby -v it is
    >> giving me version 1.8, when I'm compiling my code how do I know which
    >> version of ruby I'm using? 1.9 is installed in my /opt/local/lib

    >
    > at the prompt, type which ruby <return> and that will give you the
    > path to the executable
    >
    > also, you might want to check your PATH env variable to make sure it's
    > finding the right one first, although I think OSX has a mechanism for
    > switching that's kind of a half baked version of the Linux
    > alternatives mechanism for switching between various versions of
    > "stuff". Although, in fairness this seems to work quite well for java
    > on the mac. Anyway, check your path with either echo $PATH of env
    > commands and see what it says. You may have to force it by modifying
    > the path in .bash_profile in your home directory (assuming bash) or
    > some other file that's modifying your path variable. Hope that helps.


    Sorry but I cannot find the file to modify my path env variable.

    Thanks
    --
    Posted via http://www.ruby-forum.com/.
    Zayd Connor, Apr 6, 2009
    #9
    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. feng
    Replies:
    1
    Views:
    471
    Cowboy \(Gregory A. Beamer\)
    Dec 3, 2003
  2. Tony Clarke
    Replies:
    0
    Views:
    253
    Tony Clarke
    Jun 28, 2004
  3. Replies:
    1
    Views:
    127
    KUBO Takehiro
    Feb 14, 2006
  4. Micah Cochran
    Replies:
    0
    Views:
    91
    Micah Cochran
    Sep 22, 2006
  5. Peter Vanderhaden

    Newbi needs help installing Rubygems in XP

    Peter Vanderhaden, Sep 30, 2007, in forum: Ruby
    Replies:
    2
    Views:
    107
    Peter Vanderhaden
    Sep 30, 2007
Loading...

Share This Page