Skip to content

Instantly share code, notes, and snippets.

@nickwhitt
Last active December 15, 2015 15:19
Show Gist options
  • Save nickwhitt/5280572 to your computer and use it in GitHub Desktop.
Save nickwhitt/5280572 to your computer and use it in GitHub Desktop.

Install rbenv and ruby-build with homebrew

$> brew install rbenv ruby-build

Install ruby 1.9.3 and declare global default

$> rbenv install 1.9.3-p392
$> rbenv global 1.9.3-p392
$> gem install rails
$> rails new proj-1.9.3

Install ruby 2.0.0 and use temp shell env to create an edge project

$> rbenv install 2.0.0-p0
$> rbenv shell 2.0.0-p0
$> gem install rails --version 4.0.0.beta1 --no-ri --no-rdoc
$> rails new proj-2.0.0

Switching between projects will auto-shim to appropriate env

$> cd /path/to/proj-1.9.3
$> ruby -v
# ruby 1.9.3p392

$> cd /path/to/proj-2.0.0
$> ruby -v
# ruby 2.0.0p0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment