Intstalled Ruby 1.8.7 but still getting ruby -v => 1.8.6

Discussion in 'Ruby' started by Mitchell Gould, Aug 17, 2010.

  1. I have followed the instructions to install ruby 1.8.7. Everything seems
    to have installed as best that I can determine.

    However when I run the command

    ruby -v

    I get

    ruby 1.8.6 (2009-06-08 patchlevel 369) [universal-darwin9.0]

    Why is that?

    Also do I have to tell my Rails application to use 1.8.7 and if so how
    do I do this?

    Thank you in advance

    Mitchell
    --
    Posted via http://www.ruby-forum.com/.
     
    Mitchell Gould, Aug 17, 2010
    #1
    1. Advertising

  2. Mitchell Gould wrote:
    > I have followed the instructions to install ruby 1.8.7.


    Which instructions? What did you do? On what platform? The question
    as-is is missing important information.

    > However when I run the command
    >
    > ruby -v
    >
    > I get
    >
    > ruby 1.8.6 (2009-06-08 patchlevel 369) [universal-darwin9.0]


    Then I can guess you're on a Mac, at least.

    > Why is that?


    "which ruby" will tell you where it found it. Presumably your other
    installation is either not in $PATH or is later in $PATH; or it was
    installed under a different name (e.g. "ruby187" instead of "ruby").

    > Also do I have to tell my Rails application to use 1.8.7 and if so how
    > do I do this?


    You will probably need to reinstall all your gems, including rails,
    using 1.8.7 so they will go in 1.8.7's gems directory. If you build ruby
    from source, then you will likely need to build rubygems itself from
    source first.

    --
    Posted via http://www.ruby-forum.com/.
     
    Brian Candler, Aug 17, 2010
    #2
    1. Advertising

  3. Brian Candler wrote:
    > Mitchell Gould wrote:
    >> I have followed the instructions to install ruby 1.8.7.

    >
    > Which instructions? What did you do? On what platform? The question
    > as-is is missing important information.


    I followed these instructions that were posted on this forum.

    http://www.ruby-forum.com/topic/154868


    >
    >> However when I run the command
    >>
    >> ruby -v
    >>
    >> I get
    >>
    >> ruby 1.8.6 (2009-06-08 patchlevel 369) [universal-darwin9.0]

    >
    > Then I can guess you're on a Mac, at least.
    >
    >> Why is that?

    >
    > "which ruby" will tell you where it found it. Presumably your other
    > installation is either not in $PATH or is later in $PATH; or it was
    > installed under a different name (e.g. "ruby187" instead of "ruby").
    >
    >> Also do I have to tell my Rails application to use 1.8.7 and if so how
    >> do I do this?

    >
    > You will probably need to reinstall all your gems, including rails,
    > using 1.8.7 so they will go in 1.8.7's gems directory. If you build ruby
    > from source, then you will likely need to build rubygems itself from
    > source first.


    --
    Posted via http://www.ruby-forum.com/.
     
    Mitchell Gould, Aug 17, 2010
    #3
  4. Mitchell Gould wrote:
    > I followed these instructions that were posted on this forum.
    >
    > http://www.ruby-forum.com/topic/154868


    Did you do a plain "./configure" or did you add any options to it?

    If not, then your new ruby should be in /usr/local/bin. Try this:

    /usr/local/bin/ruby -v

    If that works, but ruby -v still gives 1.8.6, then show us the output of

    echo $PATH
    --
    Posted via http://www.ruby-forum.com/.
     
    Brian Candler, Aug 17, 2010
    #4
  5. Mitchell Gould

    Roger Pack Guest

    > However when I run the command
    >
    > ruby -v
    >
    > I get
    >
    > ruby 1.8.6 (2009-06-08 patchlevel 369) [universal-darwin9.0]
    >
    > Why is that?


    running "whereis ruby" will probably tell you which one it is using, and
    if there are multiples on your path or not (it uses the first).
    The "whichr" gem will do the same (install it, run "whichr ruby")
    Cheers.
    -r
    --
    Posted via http://www.ruby-forum.com/.
     
    Roger Pack, Aug 17, 2010
    #5
  6. Brian Candler wrote:
    > Mitchell Gould wrote:
    >> I followed these instructions that were posted on this forum.
    >>
    >> http://www.ruby-forum.com/topic/154868

    >
    > Did you do a plain "./configure" or did you add any options to it?
    >
    > If not, then your new ruby should be in /usr/local/bin. Try this:
    >
    > /usr/local/bin/ruby -v
    >
    > If that works, but ruby -v still gives 1.8.6, then show us the output of
    >
    > echo $PATH


    I Did not do any options when I installed. However I have discovered
    that my ruby 1.8.6 is installed in /usr/bin/ not /usr/local/bin but my
    new ruby 1.8.7 is installed in /usr/local/bin.

    Should I reinstall ruby 1.8.7 in usr/bin where ruby 1.8.6 is installed?

    echo $PATH
    /usr/local/bin:/usr/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin

    Thanks for your help.
    --
    Posted via http://www.ruby-forum.com/.
     
    Mitchell Gould, Aug 18, 2010
    #6
  7. Mitchell Gould

    Roger Pack Guest


    > Should I reinstall ruby 1.8.7 in usr/bin where ruby 1.8.6 is installed?


    I would just rename /usr/bin/ruby to /usr/bin/ruby_old or something.
    But that's just me, and I'm a bit lazy.
    -r
    --
    Posted via http://www.ruby-forum.com/.
     
    Roger Pack, Aug 18, 2010
    #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. =?Utf-8?B?RGFuIE5hc2g=?=

    windows authentication but still getting Login box

    =?Utf-8?B?RGFuIE5hc2g=?=, Oct 12, 2004, in forum: ASP .Net
    Replies:
    3
    Views:
    1,797
    Scott Allen
    Oct 13, 2004
  2. Brent White
    Replies:
    8
    Views:
    630
    S. Justin Gengo
    Oct 26, 2005
  3. Mike
    Replies:
    10
    Views:
    538
    =?ISO-8859-1?Q?G=F6ran_Andersson?=
    Aug 18, 2007
  4. David C
    Replies:
    2
    Views:
    326
    David C
    Aug 27, 2007
  5. laredotornado
    Replies:
    3
    Views:
    3,442
Loading...

Share This Page