This workshop will be retired on May 1, 2025.
Heads up! To view this whole video, sign in with your Courses account or enroll in your free 7-day trial. Sign In Enroll
Start a free Courses trial
to watch this video
In this video, you'll learn how to install a Ruby on Rails Development Environment in OS X.
Note: A more current version of this workshop is available here.
Install XCode
XCode can be installed from the App Store. The rest of these commands take place in a Terminal.
Install XCode
Command line tools come with it. Show app store.
Install Homebrew
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew update
brew doctor
Install rbenv from Homebrew
brew install rbenv ruby-build
echo "gem: --no-document" > ~/.gemrc
Install a ruby
rbenv install 2.2.1
rbenv global 2.2.1
rbenv rehash
Install a database
brew install mysql
Install other dependencies
brew install wget curl imagemagick
Install sublimetext
Download from the Sublime Text website.
ln -s "/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl" /usr/local/bin/sublime
Install bundler and rails
In a terminal:
gem install bundler
rbenv rehash
gem install rails
Configure git
git config --global user.name "Jason Seifer"
git config --global user.email jason@teamtreehouse.com
Create a new app
mkdir projects
cd projects
rails new testapp
cd testapp
subl -n .
bin/rails server
Create a quick scaffold
bin/rails generate scaffold name title:string first:string last:string
bin/rake db:migrate
bin/rails s
Related Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign upRelated Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign up
You need to sign up for Treehouse in order to download course files.
Sign upYou need to sign up for Treehouse in order to set up Workspace
Sign up