views:

126

answers:

3

I want to upgrade my Mac Snow Leopard ruby from 1.8.7 to 1.9.1 version, anyone know the painless and best way to upgrade? because i read some forum/post/blog/discussion say that is it not good to override the ruby that ship by apple

and what the best way to upgrade rails from version 2.2.2 to 2.3.8? because all the information that i find either is for leopard/tiger only & few complicate article for snow leopard. and they also say is it not good to override the rails that ship by apple.

anyone can help me?

Thank.

+4  A: 
  • Dan Benjamin has some great instructions for compiling and installing Ruby, RubyGems and Rails into usr/local over at Hivelogic. This doesn't actually overwrite the system install of Ruby/RubyGems/Rails but rather takes precedence over it. Although the instructions cover Ruby 1.8.7, you can just update as appropriate for the 1.9.1 distribution.

  • Alternatively, Ruby Version Manager (RVM) is a great way to manage multiple Ruby versions and associated gems. This Railscast episode has the details.

  • You should be able to upgrade Rails to 2.3.8 using [sudo] gem install rails as usual.

John Topley
definitely go with RVM
Dan McNevin
A: 

I would recommend using MacPorts for most custom installs. It will install everything separately in /opt while keeping apple's original stuff intact. And also fetch any dependencies automatically.

For example, to install ruby 1.9.1 I would do port install ruby19 in the terminal and it would fetch and compile everything for me.

baloo
A: 

Thank for answer, i manage to upgrade rails and ruby now. Thank.

devlim
This should be a comment, not an answer.
Andrew Grimm