Deonomo
Deonomo

Reputation: 1633

Uninstalling and upgrading Ruby on a Mac without using RVM

I recently decided to uninstall RVM from my system. Some of the arguments made at this page convinced me:

Actually, what I decided, however, is that I don't want to worry about multiple versions of Ruby at all. I just want to use version 1.9.2-p290 and not worry about anything else. When I run ruby --version on my Mac, though, it tells me I have version 1.8.7. I have looked around for how to simply uninstall this Ruby from my Mac, but I haven't found anything, weirdly. It seems that the only people who ever want to uninstall Ruby run linux and everyone using a Mac recommends RVM.

How do I uninstall Ruby 1.8.7 from my Mac? I'd like to move to version 1.9.2-p290 and I'd like to have only one version on my system.

Upvotes: 6

Views: 15740

Answers (2)

Filipe Miguel Fonseca
Filipe Miguel Fonseca

Reputation: 6436

You should go with macports and install ruby19 port:

sudo port install ruby19 +nosuffix

The new ruby version will take precedence over the preinstalled one.

Upvotes: 2

Winfield
Winfield

Reputation: 19145

It's easier to install a new version of ruby and just update your path so that all of the binaries reference your new installation. I do this locally with REE (installed in /opt/ruby-enterprise-1.8.7-2010.02)

export PATH=/opt/ruby-enterprise-1.8.7-2010.02/bin:$PATH

$> which ruby
/opt/ruby-enterprise-1.8.7-2010.02/bin/ruby

You don't get the advantage (or complexity) of hot-swapping ruby interpreters on the fly like RVM, but I set this up when I built this dev system and have never had to change it.

Since ruby comes with OSX, I don't recommend trying to remove it, just work-around the system version.

Upvotes: 7

Related Questions