Skip to content

Instantly share code, notes, and snippets.

@jonstokes
Forked from jpantuso/osx_lion_rail_setup.md
Last active December 10, 2015 22:08
Show Gist options
  • Save jonstokes/4499596 to your computer and use it in GitHub Desktop.
Save jonstokes/4499596 to your computer and use it in GitHub Desktop.

Setup new Mac with OSX Mountain Lion from scratch

These commands are good as of 2013-1-8.

Install The latest XCode from the App Store

App store http://itunes.apple.com/us/app/xcode/id448457090?mt=12) The download/install takes awhile so start it first. When it finishes downloading you will still need to run it to complete installation.

Install Command Line Tools

In XCode's Preferences > Downloads you can install command line tools.

Let Everyone Know Where XCode Is

sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer

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.

First, install X11

Visit http://xquartz.macosforge.org/trac/wiki and download and install the latest version.

You will need to fix the symlink it makes:

ln -s /opt/X11 /usr/X11

Log out, then log back in.

Now you can install Homebrew

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

(Note that Xcode is a pre-req for Homebrew)

Take Dr. Brew's advice, whatever it is:

brew doctor

Set shell to ZSH and install oh-my-zsh

brew install wget
wget --no-check-certificate https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh -O - | sh

restart iTerm2

SCM

Git

brew install git

http://help.github.com/mac-set-up-git/

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

bash -s stable < <(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer)
rvm get head

.zshrc

[[ -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.3 --with-gcc=clang
rvm install jruby-1.7.1

Regarding the --with-gcc=clang line, see: http://stackoverflow.com/questions/8032824/cant-install-ruby-under-lion-with-rvm-gcc-issues

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.

rvm notes

Create a .gemrc file and add the line

gem: --no-ri --no-rdoc

mysql

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