Compiling a Web Development Environment on Mac OS X

rbenv

Links: Homepage
Dependencies: None

Ruby version manager that lets you easily switch between multiple versions of Ruby.

Install

Switch to the /usr/local folder.

cd /usr/local

Check out rbenv into /usr/local/rbenv.

git clone git://github.com/sstephenson/rbenv.git rbenv

Shell

Add the following lines to your Bash startup script to put rbenv into your path.

echo 'export PATH=/usr/local/rbenv/bin:$PATH' >> ~/.bash_profile

Add the rbenv root folder configuration to your shell.

echo 'export RBENV_ROOT=/usr/local/rbenv' >> ~/.bash_profile

Add rbenv init to your shell to enable shims and autocompletion.

echo 'eval "$(rbenv init -)"' >> ~/.bash_profile

Load the new shell configurations.

source ~/.bash_profile

Install Ruby Versions

To install Ruby versions, check the section on installing Ruby.

Upgrading

To upgrade to the latest development version of rbenv, use git pull.

cd /usr/local/rbenv
git pull