Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 349
Deonomo Avatar asked Sep 06 '11 22:09

Deonomo


People also ask

How do I uninstall and install Ruby on Mac?

Uninstall Ruby on Mac with rbenv For rbenv, use rbenv versions to see which versions you have installed. Use the uninstall command to remove a version. This will remove any gems associated with the version as well. If you want to reinstall Ruby, see Install Ruby on Mac for recommendations of newer version managers.

How do I uninstall Ruby on Mac RVM?

There are two ways to remove rubies from rvm: rvm remove # Removes the ruby, source files and optional gemsets / archives. rvm uninstall # Just removes the ruby - leaves everything else.


1 Answers

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.

like image 166
Winfield Avatar answered Sep 22 '22 11:09

Winfield