Want to highlight a helpful answer? Upvote!

Did someone help you, or did an answer or User Tip resolve your issue? Upvote by selecting the upvote arrow. Your feedback helps others! Learn more about when to upvote >

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Update Ruby with Mountain Lion

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!

Posted on Sep 27, 2012 7:33 AM

Reply
4 replies

Sep 27, 2012 8:44 AM in response to RussellSK

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.

Update Ruby with Mountain Lion

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.