Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to update to Ruby 1.8.7

Tags:

macos

ruby

I am new to Ruby, so bear with me. I've been trying to update my Ruby to 1.8.7 and just ran into many issues on my Mac OS X (10.5.7).

So really, how do you update to Ruby 1.8.7?

Thanks.

like image 770
Brian Liang Avatar asked May 21 '09 02:05

Brian Liang


4 Answers

The simplest answer is "don't". Ruby 1.8.7 was an attempt to create bridging release between 1.8 and 1.9, and the consensus of the community was that this was not necessary, so there was little support for it before 1.9 was finalized. The general recommendation is either to stick with 1.8 (the version is supplied with OS X 10.5), or use Ruby 1.9.

MacPorts has packages for Ruby 1.8.7 and Ruby 1.9, so that is probably the easiest way to get newer versions of Ruby without any risk of modifying OS X itself.

UPDATE: As ajhit406 noted, RVM is now the best option, rather than MacPorts.

like image 71
Stuart Ellis Avatar answered Nov 15 '22 02:11

Stuart Ellis


Have you tried the one click installer?

Edit: the one click installer look like no more maintained, try Rails Installer.

like image 28
Charlie Martin Avatar answered Nov 15 '22 03:11

Charlie Martin


necromancing...

http://rvm.io/

Edit(mpapis): Ruby 1.8.7 is no more maintained by Ruby team and should not be used anymore.

like image 27
ajhit406 Avatar answered Nov 15 '22 02:11

ajhit406


Download and unpack the version of Ruby you want. We'll call the directory ruby_1.8.7 and assume it is in your home directory. Open a terminal window.

sudo cp -r ruby_1.8.7 /System/Library/Frameworks/Ruby.framework/Versions/1.8.7
cd /System/Library/Frameworks/Ruby.framework/Versions
sudo ln -sfh 1.8.7 Current
like image 20
Rob Spieldenner Avatar answered Nov 15 '22 04:11

Rob Spieldenner