It's time to install all of the things! It's here we'll show you all the apps you'll want to use that will be helpful through the duration of the course.
- Configuring your development environment
Click on the Apple logo in the top left hand of your screen. Select "About This Mac." You should see a version number for OS X. What matters are the first two numbers (the major version and the minor version, respectively).
- 10.6 - Snow Leopard
- 10.7 - Lion
- 10.8 - Mountain Lion
- 10.9 - Mavericks
You will need an Apple ID to install applications through the App Store. Plus, you might want to use iCloud to back up some data. If you don't already have an Apple ID, now might be a good time to create one. To do so, visit My Apple ID.
If you haven't upgraded OS X in a while, you might want to take the time to get the latest and greatest version that will run on your Mac. Apple usually charges a nominal fee for older OS X versions and Mavericks (version 10.9) is free!
Hint: You can command + click
links to open them in a new window.
There are a few methods of distributing software for installation on on OS X
- Compressed Files: .zip, .tar.gz, and .7z extensions
- Disk Images: .dmg
- Installers: .pkg
Unpackage these files by double-clicking. Then, drag the unpackaged application to your Applications folder. Installers will typically handle the process of copying over to the Applications folder for you.
Chrome will be your primary development browser. Chrome is fast and efficient. Chrome's developer tools (right click on an a page and select "Inspect Element") are tremendously powerful and helpful for web development.
Atom will be your editor of choice. It offers many useful features and plugins that will help to make you a more efficient developer.
Atom offers a command line tool so that you can quickly open directories and files from the terminal window. Once installed, you should be able to run atom <filename>
to open a file from the terminal. Running atom .
will open all the files in your present working directory in Atom's "Project View" mode.
Open the GitHub app and sign in with your Github credentials. Next, go to preferences and click on advanced. Click on "Install Command Line Tools". This will allow you to now type github
into the terminal and open up that repository inside of the GitHub application.
Git, and Source Control in general, is one of the hardest concepts you'll have to learn as part of Launch Academy. A visual tool like GitHub for Mac will help you visualize "the commit graph" and to understand the code commit process.
While all of git's commands are available through the command line, the GitHub app is an extremely helpful way of reviewing your changes before making a commit.
Install the command line tools by entering the following command into your terminal:
xcode-select --install
If the install fails, visit the Apple Developer Tools site and download and install the Xcode Command Line Tools for your version of OSX.
After installing the Xcode Command Line Tools, check the App Store for system updates. Install them and reboot your computer.
Note: Do not skip this step! If you cannot successfully install the Xcode Command Line Tools, file a Help Request.
Homebrew installs the stuff you need that Apple didn't.
Run this command in the terminal:
ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"
ZOMG it's a Ruby script! It will take care of installing Homebrew for you.
Set iTerm to Reuse Previous Session's Directory:
Go to Preferences -> Profiles -> General -> Working Directory
and choose "Reuse previous session's directory".
Note: You should now use iTerm instead of terminal for everything.
The built in Terminal.app is great, but iTerm2 has some neat features that you will make your life as a developer easier.
Oh My ZSH will make working in your terminal much more enjoyable. It will configure a lot of things for you, such as autocompletion and awesome colors.
Install it by running the following command in your terminal:
curl -L https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh | sh
Finish the Oh My ZSH installation by restarting iTerm. Enjoy the magic!
As a developer, you'll spend lots of quality time in your terminal, so it's a good idea to take advantage of tools that make it easier and more fun to use.
If you have RVM or MacPorts installed, uninstall it before continuing. You can uninstall RVM with sudo rvm implode
. You can uninstall MacPorts by following this guide.
chruby allows you to switch between different versions of Ruby. We'll use ruby-install to install the different versions of Ruby. For now, we're going to use Ruby 2.0.
# Install chruby
brew install chruby
# Enable Auto-Switching current Ruby
echo "source /usr/local/share/chruby/chruby.sh\nsource /usr/local/share/chruby/auto.sh" >> ~/.zshrc
# Ruby installing tool
brew install ruby-install
# Install Ruby 2.2.0
ruby-install ruby 2.2.0
# Set Ruby 2.2 as your default Ruby
echo "ruby-2.2.0" >> ~/.ruby-version
# Close iTerm and reopen it in order for these changes to take effect.
# Avoid ever having to `bundle exec` your commands
gem install rubygems-bundler
gem regenerate_binstubs
Homebrew command didn't work, used the one from the Homebrew link instead just fine. The last two lines with gems for bundler didn't work, used gem install bundler instead.