Thoughtbot's Laptop Script is an excellent place to start. Using this script removes the need to do any of the steps below except for the final one. If you plan to set up manually, install the following tools (in this order):
- Xcode Command-line tools (
xcode-select --install
), or all of Xcode if running on Mac OSX 10.8 or lower - Homebrew package manager
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
- Rbenv and ruby-build to manage different versions of Ruby
After install, runrbenv init
to setup
brew install rbenv ruby-build
- Ruby 2.3.1:
rbenv install 2.3.1
(may take some time) - Use this version of ruby everywhere with
rbenv global 2.3.1
- Run
gem install bundler
to install Ruby's Bundler tool. Run the commandrbenv rehash
in your terminal after installing bundler. - Finally,
gem install rails
.