Skip to content

Instantly share code, notes, and snippets.

@leesmith
Last active October 13, 2015 14:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save leesmith/4212590 to your computer and use it in GitHub Desktop.
Save leesmith/4212590 to your computer and use it in GitHub Desktop.
Ruby development setup on OSX Mountain Lion from scratch

Ruby development setup on OSX Mountain Lion from scratch

Install Xcode from app store

Install Xcode command line tools from the "Xcode > Preferences > Downloads" menu

Generate ssh key & copy to github

ssh-keygen -t rsa -C "your.email@example.com"
pbcopy < ~/.ssh/id_rsa.pub

Create projects folder

mkdir ~/projects

Install Homebrew

ruby -e "$(curl -fsSkL raw.github.com/mxcl/homebrew/go)"
brew doctor

Install GCC compiler in order to build ruby versions earlier than 1.9.3

brew tap homebrew/dupes
brew install autoconf automake apple-gcc42

Install rbenv & ruby-build

brew install rbenv ruby-build

Install rubies

CONFIGURE_OPTS="--without-tcl --without-tk" rbenv install 1.8.7-p371
rbenv install 1.9.2-p320
rbenv install 1.9.3-p385
rbenv global 1.9.3-p385

Install relevant homebrew formulas

brew install ack bash bash-completion coreutils ctags curl git heroku-toolbelt mongodb node postgresql mysql readline reattach-to-user-namespace sqlite tmux tree watch wget python vim

Change shell to homebrew bash

echo /usr/local/bin/bash >> /etc/shells
chsh -s /usr/local/bin/bash

Setup postgresql

initdb /usr/local/var/postgres -E utf8

Install iTerm2

iTerm2

Clone solarized project & import iTerm2 color schemes

git clone https://github.com/altercation/solarized.git

Clone polka and install

git clone git://github.com/leesmith/polka.git
./install.sh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment