Skip to content

Instantly share code, notes, and snippets.

@stanleycyang
Created June 22, 2015 03:53
Show Gist options
  • Save stanleycyang/e5438a200157a2d8423e to your computer and use it in GitHub Desktop.
Save stanleycyang/e5438a200157a2d8423e to your computer and use it in GitHub Desktop.

#WDI Installfest (Mac)

Please check your OS X version before beginning. (Click the Apple menu and choose About this Mac.) This set of steps should work for Mavericks or Yosemite; if you're on another version, let an instructor know.

##XCode

Open up your App store and install XCode

Find an instructor for support if you have any errors!

##Homebrew

###Install Homebrew

In Terminal:

  • If you already have Homebrew (check by using brew doctor), you do not need to do this step.

ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

###Brew Doctor brew doctor

  • See what the Doctor says. You may need to edit your ~/.bash_profile or make other adjustments. If you're not sure how to handle the output, flag down an instructor!

Rule of thumb: Don't type any commands starting with 'sudo' unless an instructor okays it :)

##rbenv & Ruby

###Install RBENV

In Terminal:

brew update

then, we'll use brew to install rbenv:

brew install rbenv rbenv-gem-rehash ruby-build

then, we'll enable shims and autocompletion:

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

then, we'll make sure your $PATH has access to the rbenv command-line utility:

echo 'export PATH="$HOME/.rbenv/shims:$PATH"' >> ~/.bash_profile

then, reload your bash profile:

source ~/.bash_profile

###Install Ruby 2.2.1

Curious whether you've got Ruby installed already? Type ruby -v in Terminal to find out.

In Terminal:

rbenv install 2.2.1

This will take a while. Don't panic if it's more than 5 minutes and it looks like nothing has happened.

###Set Ruby 2.2.1 as the Default

In Terminal:

rbenv global 2.2.1

###Rehash to install shims

In Terminal:

rbenv rehash

##Rails

###Install Rails 4.2.0 & rehash

In Terminal:

gem install rails --version=4.2.0 --no-ri --no-rdoc

###Update paths

In Terminal:

sudo nano /etc/paths

Enter your password. Now, we will add the path where Homebrew installs software. It is important that files here are executed before the default software installed with your Mac. So, add a line to the top of the file:

/usr/local/bin

Press Control-X to exit. Press Y when prompted with saving.

###Double-check your Ruby & Rails versions

In Terminal:

ruby -v

then

rails -v

You should have Ruby 2.2.1 and Rails 4.2.0.

If you don't, please find an instructor!

##Install Git, MongoDB, PostgreSQL, and ImageMagick

In Terminal, install the distributed version control system Git:

brew install git

Install the databases MongoDB and PostgreSQL:

brew install mongodb postgresql

Install the image processing library ImageMagick (used with Paperclip later on):

brew install imagemagick

##Update git config information

In Terminal:

git config --global user.name "Your Name"

then, using the same email you used to sign up with Github,

git config --global user.email [email protected]

then

git config --global credential.helper cache

##node.js

Download the Macintosh Installer. Run the installer using the defaults.

##Heroku Toolbelt

Download and install Heroku Toolbelt

brew install heroku-toolbelt

Sign up for a heroku account

Click here to sign up: Heroku Signup

Enter your credit card information on heroku

NOTE: This way you can deploy unlimited applications on heroku free of charge!

##Sublime Text 3

  • Download and install Sublime Text 3. After running the downloaded file, a Finder window will open. Inside this window, drag the Sublime Text icon into the Applications folder.

  • Add Sublime Text to your dock. Press Command-Space to open Spotlight. Type Sublime, then drag the Sublime Text icon to the dock at the bottom of your screen. This allows you to easily open Sublime Text.

  • Set up the subl command line tool. In Terminal:

    ln -s "/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl" /usr/local/bin/subl

    To ensure it works, in Terminal:

    subl --help

##Optional

  • Install Mou. Mou allows you to edit and view Markdown files.
  • Install iTerm. iTerm is a cooler terminal :-)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment