The following are my steps for configuring a new development machine running OSX Yosemite.

  1. Install Xcode, which comes with essential build tools for OSX and iOS as well as a sweet mobile device emulator. After installation, try printing the path of the xcode developer directory:

    xcode-select -p

    You should see something like /Applications/ as output. If this does not work, try running:

    xcode-select --install
  2. Install Homebrew, also known as the missing package manager for OSX. It’s a program similar to apt-get for Debian and Ubuntu that makes installing common software dead simple.

    ruby -e "$(curl -fsSL"

    Confirm that this worked by checking the version number (e.g. Homebrew 0.9.5):

    brew -v
  3. In OSX, the default terminal program called Terminal is passable, but iTerm2 has way more features. Download it from the iTerm2 home page and enjoy.

  4. Install a “version manager” for Ruby and Rubygems, which allows you to switch between older and newer versions as required. Both RVM and rbenv are great for this purpose, but I tend to agree with the reasons for rbenv given by its author.

    • To install rbenv:

      brew install rbenv
    • Carefully follow the post-installation instructions, and in particular, the step that involves adding eval "$(rbenv init -)" to your profile script (usuall either .bashrc or .zshrc). Confirm that this worked by checking the version number (e.g. rbenv 0.4.0) in a new terminal window.

      rbenv -v
    • Install the ruby-build plugin, which simplifies installing new Ruby versions.

      brew install ruby-build
    • Install a recent version of Ruby to use globally.

      rbenv install 2.2.1
      rbenv global 2.2.1
    • Open a new terminal window, and test that the desired version of Ruby is being used (should say something like ruby 2.2.1).

      ruby -v
  5. For Java work (including Android below) download the Java Development Kit. Once installed, confirm it by checking the version number (e.g. javac 1.8.0_40).

    javac -version
  6. For Android development, also install Android Studio. Note that the instructions say:

    By default, the Android SDK does not include everything you need to start developing.

    Therefore, follow up with the Adding SDK Packages section.

  7. If you want to rename your machine, use sudo to act as a superuser and run scutil, a command that manages system configuration. Replace “example” with your actual new host (i.e. computer) name.

    sudo scutil --set HostName example 

That’s all for now. By the way, I’m currently using a MacBook Pro Retina, 15-inch, Early 2013, 2.4 GHz Intel Core i7, 16 GB 1600 MHz DDR3.