Skip to content

Instantly share code, notes, and snippets.

Created July 27, 2011 19:51
Star You must be signed in to star a gist
Save jpantuso/1110217 to your computer and use it in GitHub Desktop.
Setup OS X 10.7 w/ homebrew, oh-my-zsh, rvm, rails, and MySQL

Setup new Mac with OSX Lion from scratch

These commands are good as of 2011-07-27.

Install xcode 4

App store The download/install takes awhile so start it first. When it finishes downloading you will still need to run it to complete installation.

Really the nicest choice for a terminal on OSX right now, especially with Lion style full screen support.

I feel there is an advantage in setting all your dev apps to use a consistent color scheme, especially your terminal and text editor/dev environment.

ruby -e "$(curl -fsSL"

Note that Xcode is a pre-req for Homebrew

Set shell to ZSH and install oh-my-zsh

brew install wget
wget --no-check-certificate -O - | sh

restart iTerm2



brew install git

Copy over your SSH Keys from your existing machine if you have them and want to carry over your existing SSH configs.

bash < <(curl -s


[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm"  # This loads RVM into a shell session.

Start new shell session

Install ruby

rvm install 1.9.2
rvm install 1.8.7
rvm notes

See if there is anything in the rvm notes you need to take action on. As of this writing the compiler needs to be overridden. Create a .gemrc file and add the line gem: --no-ri --no-rdoc

rvm --default 1.8.7
rvmsudo gem install bundler
rvmsudo gem install rails


curl | sh


Get a DMG based and pre-compiled install from

Copy link

you don't install zsh directly from git repository ?

 git clone git://

Copy link

igreg commented Aug 1, 2011

You can also decide to install mysql via brew, which is relatively painless and is easier to maintain than a DMG/.pkg

Copy link

igreg commented Aug 1, 2011

ZSH is already installed on mac os x, do you see benefits from installing a custom one?

Copy link

I install brew, is great!!

Copy link

jpantuso commented Aug 2, 2011

I have a preference for installing things from binaries and installers when possible. Even for developer tools. This is a principle for me, that things should be designed to be as simple and repeatable as possible. Repeatability is the most important aspect for development process. The habit of building everything from source has deep root in Unix world that we can't change, but on the Mac it is not necessary and I would argue adds time and complexity that thousands of people have to endure. If you consider total load of time and effort on the human race, as you always must do when building something many people will consume, you should come down on the easy and fast side.

Copy link

RVM installing changed to: bash -s stable < <(curl -s

Also having issues to install Ruby 1.9.3 caused by problems with gcc. Here's a solution: rvm install 1.9.3 --with-gcc=clang

Copy link


Copy link

Homebrew command did not work for me on a fresh install of lion, but going to the mxcl's page to get the latest install command worked great!

/usr/bin/ruby -e "$(/usr/bin/curl -fsSL"

Copy link

same with RVM command here did not work, but going to RVM site and following commands there worked great.

Copy link

Homebrew changed location:

ruby <(curl -fsSk

Copy link

qtpi commented Feb 12, 2013

I've updated some information that makes this gist broken. You can find it all in this fork:

Copy link

jupinj commented Apr 22, 2013

benjohnsonn77 -> hey, do you know how I can get that build - I'm having the same problem with my LionServer box - homebrew won't run. I can't ge that build from github - always returns a 404 -suggestions?

Copy link

nice work, mate! thanks

Copy link

yaauie commented Apr 23, 2014

suggesting a wget piped to sh with the --no-check-certificate flag is terribly irresponsible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment