AndyNico
AndyNico

Reputation: 853

Ruby 1.8.7 to 1.9.1 on OS X 10.6

I am currently learning Ruby using Ruby 1.8.7 (pre-installed on OS X 10.6) but understand the latest version is 1.9.1?

Is it a requirement for me to 'upgrade' this to get the most out of the language? What are the differences between 1.8.7 and 1.9.1?

If an upgrade is advisable can anyone advise how I should go about upgrading my Ruby?

Upvotes: 0

Views: 406

Answers (3)

clt60
clt60

Reputation: 63974

RVM is cool. But probably later you will need another gnu software, not native in OS X. Therefore, i'm recommending to use macports.

  • go to www.macports.org
  • download the installation dmg
  • install it
  • open an new Terminal windows (or source ~/.profile )

Enter the following

sudo port selfupdate
sudo port install ruby19
port search rb19-

pick what you want and install them with port install command. (as above), for example

sudo port install rb19-rails
sudo port install rb19-rails_best_practices
sudo port install rb19-actionpack

and so on...

Note

  • everything will compile, so need Installed Apple Developer, and will take a long time.
  • you need to use /opt/local/bin/ruby and not /usr/bin/ruby

Everything will go into /opt/local tree - so does not interfere with your standard system binaries - your system remain untouched.

Upvotes: 0

amencarini
amencarini

Reputation: 609

Currently the stable release is 1.9.2.

It's not mandatory to upgrade, although 1.9.2 offers better performance and some nifty features (e.g.: better Unicode support, Time and regex improvements, etc.).

Choosing to upgrade mostly depends on what you need to achieve, but I would suggest to install Ruby Version Manager, so that you can install all the versions you want and easily switch between them. You can find all the info at https://rvm.io and a nice guide here: http://ruby.about.com/od/rubyversionmanager/ss/Installing-Ruby-On-Snow-Leopard-With-Rvm.htm

Upvotes: 2

tommasop
tommasop

Reputation: 18765

There is nothing like a requirement but it is strongly encouraged by the community to use ruby 1.9.2.

The best way to give it a try is through RVM

Upvotes: 1

Related Questions