4 Replies Latest reply: Sep 27, 2012 11:21 AM by VikingOSX
RussellSK Level 1 (0 points)

I have successfully updated Ruby in the past with Snow Leopard 10.6.3 and 10.6.8; however, I'm having an issue doing so with Mountain Lion 10.8.2. I have searched all over, trying to use Homebrew as well as RVM. RVM is shown to be not instaled. I used Jewelrybox, and it installed, showing .bash_profile. But RVM command is showing as an invalid command. I also upgraded Ruby that way as well as with Homebrew. So I have updated Ruby twice with 2 different methods, but running Ruby -v show older 1.8.7. How do I make the path to show the new updated Ruby. I have tried so many ways. Last resort... ask communty. Thanks!

  • RussellSK Level 1 (0 points)

    Also I do have Xcode with command line tools up to date

  • VikingOSX Level 6 (14,355 points)

    I chose not to try and update the Ruby that is installed by OS X, but I did successfully install the Ruby Version Manager (rvm) into my $HOME/.rvm.


    If you are the sole account on your machine, or the only one using Ruby, then you do not want to be root or use sudo when installing rvm, as these permissions imply multi-user usage and (if I remember correctly) will place it in /usr/local/ruby-rvm.


    Start over. Remove any reference to rvm in .bashrc, .bash_login, and .zshrc. Any reference to rvm in these files will bork a subsequent install.


    Remove $HOME/.rvm if it already exists.


    Again, for reference, here is the rvm installation and setup steps. The site has other useful info on gemsets and Rails.


    I chose to install ruby-1.9.3-head as default.


    In your Ruby scripts, the first line should look like this:


    #! /usr/bin/env ruby


    This picks up the rvm ruby version.


    The first part of my PATH entry in my .bashrc file looks like this:


    export PATH=.:~/bin:~/.rvm/bin:$PATH


    You should have a working Ruby in no time.


    PS: You will need 1.9.3 minimum to get the Ruby code compiled under OS X. Pay attention to the Ruby requirements during install.

  • RussellSK Level 1 (0 points)

    Yea, this helped get me on the right track. It wasn't in my home path. So the sytem was looking in the wrong path with 1.8.7 installed. I finally got it figured out and helped find a solution. RVM was the biggest issue. Once that was installed properly, of course the rest was easy. Thanks for your time.

  • VikingOSX Level 6 (14,355 points)

    Glad to help. Now to code some cool stuff.