Install and configure ruby-install and chruby and build the latest Ruby and JRuby:
curl -fsSL https://gist.github.com/havenwood/5820213/raw/install.sh | sh
Or if you prefer, paste the install.sh script below in your Terminal.
- OS X
- Homebrew
If you don't have the brew
command, install Homebrew:
ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)"
And make sure you have Xcode installed so you can build from source.
Install additional Rubies with ruby-install. Select the current Ruby with chruby. Edit ~/.ruby-version to change the default Ruby.