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!