Ruby Compendium - Versions and Implementations

One thing that may appear unusual and even discouraging to newcomers is the different versions and implementations of the language. Ruby has two version branches:

  • 1.8 – The former stable version, which is still widely used in production and it is still updated.
  • 1.9 – As of release 1.9.2, this is considered the current stable and recommended version of the language. Although most third-party libraries work with it, some old and now unmaintained libraries may not. The good news is that there are normally newer and better libraries available instead.

Different implementations of Ruby offer different degrees of support to one or the other version. Compared to 1.8, Ruby 1.9 has some additional syntax for certain expressions, improved character encoding support and a few new bundled libraries and features.

If you’re new to Ruby and you have no particular restrictions or needs, you should start learning Ruby using version 1.9 (either the official implementation, JRuby or MacRuby)!

Official Ruby 1.8 Implementation

The official Ruby 1.8 implementation was written in C by Yukihiru Matsumoto, the creator of Ruby.

Official Ruby 1.9 Implementation

The official Ruby 1.9 implementation is based on a bytecode interpreter written Koichi Sasada.

JRuby

An implementation of the Ruby language running on the Java Virtual Machine, mature and usable in production. It offers real threading, performance improvements, and Java interoperability. Fully-compatible with both Ruby 1.8 and 1.9.

Rubinius

A C++ and LLVM-powered Ruby implementation. Although still not as mature as YARV or JRuby, it’s getting there. It currently aims at being compatible with Ruby 1.8.7, although support for Ruby 1.9 is planned.

MacRuby

A Mac-only Ruby implementation compatible with Ruby 1.9, specifically tuned for Mac OS X operating systems.

IronRuby

A .NET implementation of the Ruby Programming Language, compatible with Ruby 1.8.6 (IronRuby 1.0) and 1.9 (IronRuby 1.1.1 onwards). Not as mature as the other implementations.