Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Upgrading Ruby on Mac OS X

Tags:

macos

ruby

I am reading the book Programming Ruby and am looking to upgrade the version of Ruby on my computer. I run Mac OS X Snow Leopard and doing ruby -v in the command line shows I am running Ruby 1.8.7.

I installed MacPorts and ran the sudo port install ruby19 command but whenever I type ruby -v, it still shows Ruby 1.8.7.

Could anyone help with this? Thank you.

like image 592
Victor Avatar asked Aug 11 '10 02:08

Victor


People also ask

What is the latest version of Ruby for Mac?

The current stable version is 3.1. 2.

What is Ruby on macOS X?

ruby-build is a plugin for rbenv that allows you to compile and install different versions of Ruby. ruby-build can also be used as a standalone program without rbenv. It is available for macOS, Linux, and other UNIX-like operating systems.


1 Answers

The tool "rvm" is pretty good. It stands for Ruby Verson Manager I think, and the developer is good at support in the irc channels. You can install multiple versions of ruby along side each other pick the ones you want to use.

http://rvm.io

like image 65
hvgotcodes Avatar answered Oct 10 '22 15:10

hvgotcodes