4/21/2015 - 2:00 PM

Ruby on Rails Development on OSX

Ruby on Rails Development on OSX

Creating a Ruby on Rails development machine on OSX

Author: Zapata
Updated: 10/12/17

Script adapted from these sources:

Some notes:

  1. As it says above, this script is for Mac OSX. PCs are a bit more complex (as you'll see)
  2. All these commands are run from a Terminal window (command line)
  3. You will need Admin-level access to run these

i. Install Xcode The installation of Ruby/RoR requires the installation of XCode Command Line Tools

xcode-select --install

ii. Install Homebrew :boom:

ruby -e "$(curl -fsSL"

iii. Comment out documentation

echo "gem: --no-document" >> ~/.gemrc

iv. Install Ruby and Rails

curl -L | bash -s stable --auto-dotfiles --autolibs=enable --rails

:exclamation: NOW CLOSE YOUR TERMINAL WINDOW and OPEN A NEW ONE :exclamation:

v. Test your installation so far

type rvm | head -1

this should return:

rvm is a function


ruby -v
rails -v

these should return valid versions for both. If it does, pat yourself on the back. You're done with the core stuff! If not, you may have missed a step, or misstyped. There's no harm in doing it again.

vi. Install Cask :boom:

brew tap caskroom/cask

vii. These commands will install the tools you'll need for class (if you dont have them already) :boom:

brew cask install sublime-text
brew cask install slack
brew cask install iterm2
brew cask install google-chrome

viii. Some extras (if you're up to it, go the extra mile and install these too). This installs the MySQL database, and a GUI

brew install mysql
brew cask install mysqlworkbench

Once MySQL is installed, you can start, and stop the server with these commands

mysql.server start
mysql.server stop

Or if you just want to know what it's doing, do this:

mysql.server status