Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Installing Rubinius 2.0.0-dev with rbenv

Installing rbx-2.0.0-dev with Ruby 1.9 support using rbenv can be a tad tricky. This is what I did to get up and running, you'll need another version of ruby already installed as well as rake.

The basic outline:

  1. Clone Rubinius HEAD from github
  2. Configure installation for rbenv and 1.9 support
  3. Install Rubinius
  4. Configure your $PATH to use Rubinius gems
  5. Start using Rubinius

[OPTIONAL] You may need to install libyaml, otherwise you get a psych warning

$ brew install libyaml

Get the latest HEAD for rbx-2.0.0-dev

$ git clone https://github.com/rubinius/rubinius.git

Configure Rubinius for compatibility with 1.9 and install it

$ cd rubinius
$ ./configure --prefix=~/.rbenv/versions/rbx-2.0.0-dev --enable-version=1.8,1.9 --default-version=1.9
$ rake install

Rubinius keeps its gem binaries in a different location than other rubies, so you'll need to add the proper bin directory to your path for any gem commands to work. I added the following to my ZSH setup

export RBX_ROOT=$HOME/.rbenv/versions/rbx-2.0.0-dev

And then in my PATH, I included

$RBX_ROOT/gems/1.9/bin

Now start using Rubinius

$ rbenv global rbx-2.0.0-dev
@kreeger

This comment has been minimized.

Copy link

@kreeger kreeger commented Apr 1, 2012

You, sir, rock. Thanks for making my day. I will say that I did have to run this little ditty on OS X 10.7.3 with XCode 4.3 installed (you know, the one that ends up in /Applications).

# xcode-select -switch /Applications/Xcode.app/Contents/Developer

Doing so prevented a lot of errors/warnings from showing up during rake install.

@camertron

This comment has been minimized.

Copy link

@camertron camertron commented Jan 19, 2013

It's worth noting that rbx looks for gems in ~/.rbenv/versions/rbx-2.0.0-dev/1.9/bin while the rbenv which command looks in ~/.rbenv/versions/rbx-2.0.0-dev/bin. Fortunately there's a rbenv plugin that fixes this with minimal effort:

$ mkdir -p ~/.rbenv/plugins
$ cd ~/.rbenv/plugins
$ git clone https://github.com/collinschaafsma/rbenv-rbx_2.0.0-dev_fix.git

Most of this info comes from this issue on rbenv's github: rbenv/rbenv#178

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.