Search code examples
rubyosx-snow-leopardupgradervmmacports

Upgrading Ruby installation on Mac OS running Snow Leopard 10.6.5


I have a Mac Os running Snow Leopard 10.6.5 and I am trying to upgrade my Ruby installation.

Before I did anything, I run the following commands and I had the following results:

$ ruby -v
ruby 1.8.7 (2009-06-12 patchlevel 174) [universal-darwin10.0]

$ which ruby
/usr/bin/ruby

So, to upgrade my installation, I installed first macports and then Ruby using Ruby Version Manager (RVM).

1. bash < <(curl http://rvm.beginrescueend.com/releases/rvm-install-head)
2. mkdir -p ~/.rvm/src/ && cd ~/.rvm/src && rm -rf ./rvm/ && git clone --depth 1 git://github.com/wayneeseguin/rvm.git && cd rvm && ./install
3. rvm install 1.9.2
4. rvm 1.9.2 --default

After that, I run the following commands and I had the following results:

$ ruby -v
ruby 1.8.7 (2009-06-12 patchlevel 174) [universal-darwin10.0]

$ which ruby
/usr/bin/ruby

$ rvm list
=> ruby-1.9.2-p136 [ x86_64 ]

Why Ruby is still at 1.8.7? What is wrong? Or, what I forgot?


Solution

  • SOLVED:

    Edit the '.profile' file in home directory:

    Add the line at the bottom:

    export PATH="/usr/local/bin:/usr/local/sbin:/usr/local/mysql/bin:$PATH"
    

    and then in the Terminal run

    source ~/.profile
    

    to set the changes.