Rubinius 2, rbenv, and Rails 4 on OS X

In which I share what I did to get it working.

I like rbenv as my ruby version manager. I plan on deploying a Rails 4 app to my own server, that is, not Heroku or Engine Yard. I want to try puma as the Web server for that Rails installation. So, here’s what I did to get everything working correctly on my Mountain Lion MacBook Pro.

Install rbenv and ruby-build

  1. Install rbenv following the instructions of Basic GitHub Checkout
  2. Install ruby-build as an rbenv plugin
  3. Restart your shell

Get rid of the bin from your $PATH

  1. Start a shell (if you didn’t restart it from the last step in the previous section)
  2. Set the PATH variable to the PATH variable without any part of the PATH that points to the $HOME/.rbenv directory

Install Rubinius 2

  1. Install Rubinius 2 rbenv install rbx-2.0.0-rc1 rbenv rehash
  2. Add the following line to your .bash_profile to force Rubinius to use the version 1.9 interpreter. export RBXOPT=-X19

Create a Rails 4 app

RBENV_VERSION=rbx-2.0.0-rc1 rbenv exec gem install rails
RBENV_VERSION=rbx-2.0.0-rc1 rbenv exec rails new «your_project»
cd «your_project»
rbenv local rbx-2.0.0-rc1

Profit!

Python Visitor Now on GitHub

In which I provide a link to a code repo for pyvisitor.

I created the pyvisitor repository over on GitHub in case you want to use my implementation of the visitor pattern in Python.

I’ve released it under the MIT license, so you can do whatever you want with it.

It now occur to me that I should have released it under the WTFPL, but I don’t have the heart to change the LICENSE file.

Hope you enjoy it.