Skip to content

Instantly share code, notes, and snippets.

@gnilrets
Last active August 29, 2015 14:11
Show Gist options
  • Save gnilrets/079521297e2d115e448d to your computer and use it in GitHub Desktop.
Save gnilrets/079521297e2d115e448d to your computer and use it in GitHub Desktop.
Quickstart instructions for installing Ruby, Rbenv and Bundler on OS X

Installation using rbenv on OS X

Using instructions found http://robots.thoughtbot.com/using-rbenv-to-manage-rubies-and-gems and http://dan.carley.co/blog/2012/02/07/rbenv-and-bundler/. Here's how to get started with rbenv on OS X (assuming homebrew is installed):

brew update
brew install rbenv

Add the following lines to .bashrc:

# Homebrew rbenv
#To use Homebrew's directories rather than ~/.rbenv add to your profile:
export RBENV_ROOT=/usr/local/var/rbenv
if which rbenv > /dev/null; then eval "$(rbenv init -)"; fi

Restart the shell and install

brew install rbenv-gem-rehash
brew install ruby-build

Restart the shell and then install the rubies

rbenv install 2.1.3
rbenv global 2.1.3

Install rbenv-bundler

brew install rbenv-bundler
rbenv bundler on

Install bundler

gem update --system
gem install bundler
rbenv rehash

Configure bundler by adding the following to ~/.bundle/config

---
BUNDLE_PATH: vendor
BUNDLE_DISABLE_SHARED_GEMS: "1"

Finally, move into the root directory of the project and install gems

bundle install
rbenv rehash
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment