You are going to need to have libyaml installed as it is a dependency of Rubinius. On OS X this can be easily installed via Homebrew:
$ brew install libyaml
Then we clone the Rubinius repository. Clone it wherever you'd like. I usually clone temporary files to
$ git clone https://github.com/rubinius/rubinius.git $ cd rubinius
The current ruby-build script (that rbenv uses) does not specify the 1.9 syntax by default so we are configuring it ourselves:
$ ./configure --prefix=$RBENV_ROOT/versions/rbx-2.0.0-dev --enable-version=1.8,1.9 --default-version=1.9 rake install
That's right, funnily enough as you can see, you need to have Ruby to install Rubinius. It's quite Meta Install (tm).
Now if you list the available ruby versions, rbenv should list
$ rbenv versions
Now, Rubinius has a non-conventional way of handling and installing gems. It separates the gems and gems stubs installed in 1.8 and 1.9 modes. This means that Rbenv needs a special way to handle these when creating shims:
In order to work around this, we are going to have to install an rbenv plugin that fixes up the shims and sets the
RBENV_COMMAND_PATH properly for rbx-2.0.0-dev in 1.9 mode.
$ mkdir -p $RBENV_ROOT/plugins $ cd $RBENV_ROOT/plugins $ git clone https://github.com/collinschaafsma/rbenv-rbx_2.0.0-dev_fix.git
Next, just re-create the shims:
$ rbenv rehash
Now you should be all set.
I'm a Ruby/JS dev/trainer with a focus on quality. An ex-Londoner, @terracycle, @ubxd, @lastfm. Follow me at http://twitter.com/attilagyorffy