Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
Setting up a new machine

Setting up a new Mac for web development with Rails

This is my own howto to setup new machines, but you might find it helpful as well.

## General settings

  • In Finder -> Preferences set it to show your home folder, hard drives, external drives, filename extensions, etc.
  • Make Finder show Library: run chflags nohidden ~/Library/ within a terminal
  • Disable holding key pressed to display accents and enable repeat keys: defaults write -g ApplePressAndHoldEnabled -bool false
  • In Preferences->Dock Select "Scale Effect" in the "Minimize Using" field and deselect the "Animate Opening Applications" option.
  • Remove unused dashbaord widgets: Go to dashboard and press and hold the Option key. Remove widgets.
  • Disable Lion's window animations: defaults write NSGlobalDomain NSAutomaticWindowAnimationsEnabled -bool NO
  • Show all files in Finder: defaults write AppleShowAllFiles 1

## The basic stuff

  • Install iterm2:
  • Download and install gcc (w/o xcode): or go ahead and install xcode from the app store
  • Create the directory /usr/local/ as your user, otherwise it will ask for sudo during homebrew installation and the directory will be owned by root, causing errors
  • Install homebrew: (gcc is fine, no need to install XCode)
  • $ brew install git
  • $ brew update
  • $ brew install ack
  • $ brew install wget
  • Install rvm:
  • To complete the installation follow the instructions of the install script, in my case I created the file ~/.profile and pasted the following: [[ -s "/Users/alberto/.rvm/scripts/rvm" ]] && source "/Users/alberto/.rvm/scripts/rvm" # This loads RVM into a shell session.
  • Reload: $ source ~/.profile
  • Install rubies: $ rvm install 1.9.2 $ rvm install 1.8.7 $ rvm --default use 1.9.2
  • Install bash-completion: $ brew install bash-completion (and follow the instructions)
  • Install sqlite: $ brew install sqlite

Now the stuff we use for our projects

  • brew install mongodb, follow the instructions for automatic startup/shutdown
  • brew install postgresql, follow the instructions to create the DB, automatic startup/shutdown or install from PKG
  • brew install imagemagick


  • Google Chrome
  • Opera
  • Firefox
  • VirtualBox + images for IE8 & IE9


Follow the instructions described in the internal wiki

Other software

Copy the files from your backup

  • Source code directories
  • ~/.ssh directory (keys, config)
  • Dotfiles: ~/.vimrc, ~/.profile (or maybe you already use a repo for your dotfiles...)
  • Install projectplus for Textmate:
  • Textmate bundles from ~/Library/Application Support/Textmate
  • Fonts in ~/Library/Fonts
  • Copy the config files for tunnelblick: ~/Library/Application Support/Tunnelblick/Configurations
  • Music/iTunes Library
$ hdiutil mount -owners on -mountrandom /tmp -stdinpass /Volumes/TM_ALBERTO/Backups.backupdb/alberto-macbook/Latest/Macintosh\ HD/Users/alberto/alberto.sparsebundle
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment