Go to App Store and install Xcode.
Open and accept the terms
Then go to the terminal and install "Command Line Tools":
Open a terminal window and execute the Homebrew install script:
ruby -e " $( curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install) "
brew doctor
brew install caskroom/cask/brew-cask
brew tap caskroom/versions
4. Install Software via Homebrew
brew install git
brew install ant
brew install rbenv
brew install rbenv-gem-rehash
brew install rbenv-binstubs
brew install ruby-build
brew install redis
ln -sfv /usr/local/opt/redis/* .plist ~ /Library/LaunchAgents # may change, look redis installation caveats
brew install postgresql
ln -sfv /usr/local/opt/postgresql/* .plist ~ /Library/LaunchAgents # may change, look postgresql installation caveats
brew install freetype libjpeg giflib swftools
# brew cask install google-chrome
brew cask install firefox
brew cask install rubymine633
brew cask install java7
5. Install Tools, Languages
# Install latest version of Ruby
rbenv install 2.1.1
gem update --system
gem install bundler
gem install lunchy # lunchy start postgres