Mar 22, 2012 • • • • • This tutorial was last updated on May 10, 2018. NEW: My can automate the whole setup for you. After following many outdated and incomplete instructions for setting up a web development environment on a Mac (back in March 2012), and spending a lot of time finding solutions to the problems I encountered along the way, I decided to put together this detailed tutorial. Over time, as tools have improved, and with new releases of OS X, I've updated this tutorial. With Sierra, El Capitan, Yosemite and Mavericks, setting up a development environment on a Mac with Apple's standalone Command Line Tools, Homebrew, Git, RVM, Ruby, and Rails is a fairly stress-free process that's no longer fraught with the issues from two years ago.
So i finally took some time to generate Mac OS X dictionary out of Rails API docs which is ultra-fast and doesn't get in. Download Ruby on Rails.dictionary. Installing Ruby on Rails - Mac OS Lion. This will download and install C, compiler. Installing Ruby on Rails on Mac. Installing Ruby, Rubygems, Rails. Ruby on Rails, and Mongrel on Mac OS X 10.5. You’ll download and compile everything in this new folder.
In fact, the whole process can now be automated via the that I wrote for you. Whether you use my script that does everything for you, or set everything up manually, it's best that you start with a clean installation of OS X. If you've already tried to install a development environment, I can't guarantee that you won't run into any issues. Certain tools used in this tutorial might not be compatible with whatever you might have installed. For example, RVM is not compatible with rbenv, and MacPorts is not compatible with Homebrew.
Click on your OS X version below to get started: • • • • Historical Background Up until February 2012, the only way you could get the Command Line Tools required for web development was via the full Xcode package, which is almost 2 GB in size. Since then, Apple started offering the Command Line Tools (CLT) as a separate, much smaller download (~118MB), which benefits those who don't plan on writing Mac or iOS apps. There is also a third-party option, the by Kenneth Reitz, that supports both Snow Leopard and Lion.
However, it is not updated as often as the official Apple tools, and I personally ran into issues with it on Lion. When I tried Apple's CLT for Lion back in March 2012, they weren't compatible with Homebrew: Warning: Your Xcode is configured with an invalid path. How To Download Mac Os X On Windows 8.
You should change it to the correct path. Please note that there is no correct path at this time if you have *only* installed the Command Line Tools for Xcode. As of August 6, 2012, the issue above is no longer present with the latest CLT for Mountain Lion, and I believe that's the case on Lion as well, but I haven't confirmed that yet. Until I do, I recommend getting the CLT from Xcode if you're on Lion, as explained in this tutorial.
The Easy Way for Sierra, El Capitan, Yosemite and Mavericks I've written an open source script that can, including configuring your Mac to work with GitHub. If you prefer to do everything manually, start with Step 1 below. Step 1: Download and Install the Command Line Tools Installing the standalone Command Line Tools on Sierra, El Capitan, Yosemite or Mavericks Most of the work you'll be doing in this tutorial will be in the 'Terminal' application. The easiest way to open an application in OS X is to search for it via. The default keyboard shortcut for invoking Spotlight is command-Space.
Once Spotlight is up, just start typing the first few letters of the app you are looking for, and once it appears, select it, and press return to launch it. See the animated GIF below for an example: Inside the Terminal window, copy and paste (or type) the following command, and press the return key on your keyboard: xcode-select --install You should see the pop up below on your screen. Click Install when it appears. Click Agree when the License Agreement appears: Your computer will then attempt to find the software, and then will start downloading it. The following popup will appear: Once the software is installed, click Done. You're now ready to go to.
Installing the standalone Command Line Tools on Mountain Lion Go to and sign in with your Apple ID (the same one you use for iTunes and app purchases). Search for 'command line tools' (in the search field on the left), then click on the latest version of 'Command Line Tools (OS X Mountain Lion) for Xcode,' and click on the the.dmg link to download it. Once the.dmg has finished downloading, double-click on it (if it didn't already open automatically). This will mount the disk image and open a window in your Finder that looks like this: Double-click on the 'Command Line Tools (Mountain Lion).mpkg' installer and go through the installation. Once the CLT are installed, launch the 'Terminal' application via Spotlight (as explained in ), then go to.
Installing Xcode on Lion Click on this link to, then click on 'View in Mac App Store.' It should automatically launch the 'App Store' app on your Mac and take you the Xcode page. Click on the 'Free' button, then click on 'Install App.' Once the installation is complete, go to your Applications folder and double-click on Xcode, then install any required components if asked to. Windows Phone 7 Connector For Mac Download. Go to Xcode's Preferences via the menu bar, or by pressing the command and comma keys. Click on the 'Downloads' icon, then click on the 'Install' button next to 'Command Line Tools.' When prompted to log in, you should be able to use the same email and password you use for iTunes and app purchases.
Once the Command Line Tools are installed, quit Xcode, launch the 'Terminal' application via Spotlight (as explained in ), then go to. IMPORTANT NOTE: If you upgraded to Mountain Lion from Lion, and you already had Xcode installed on Lion, and you updated to Xcode 4.4 and updated the Command Line Tools while still on Lion, you will have to go back to Xcode and download the Command Line Tools again after upgrading to Mountain Lion. Snow Leopard Instructions UPDATE: A kind reader (P. Martin) pointed out that the Xcode 4.2 download for Snow Leopard is only available to those registered in the $99/year developer program. I confirmed that the latest version of Xcode for Snow Leopard available to me while signed in with a free account is 3.2.6.
I have not tested this setup with Xcode 3.2.6, but I would love to hear from you if you have. Otherwise, I recommend that you upgrade to a newer version of OS X. Go to and sign in with your Apple ID (the same one you use for iTunes and app purchases). If you are part of the $99/year Apple developer program, search for 'xcode 4.2' (in the search field on the left), then click on 'Xcode 4.2 for Snow Leopard,' and click on the.dmg link to download it.
Otherwise, search for 'xcode 3.2', then click on 'Xcode 3.2.6 and iOS SDK 4.3 for Snow Leopard,' and click on the.dmg link to download it. As mentioned at the beginning of this section, I have not tested this tutorial with Xcode 3.2.6, so I would recommend that you upgrade to a newer version of OS X. Once the.dmg has finished downloading, it should automatically mount the disk image and open a window in your Finder that looks like this: Double-click on the 'Xcode' package installer. Once the installer launches, make sure all the checkboxes are checked, as shown in the screenshot below: Click 'Continue,' and go through the rest of the installation.
If the installation fails, quit the installer, then run Software Update and install any updates that it finds. If no new updates are available, restart your computer and try installing Xcode again. Once Xcode is successfully installed, you can move on to. Step 2: Install Homebrew, 'the missing package manager for OS X,' allows you to easily install hundreds of open-source tools.
The full instructions are available on the, but you should only need to run the command that's listed at the top of the: ruby -e '$(curl -fsSL Note that the command listed on the Homebrew site could change, so please make sure that what I have listed above is the same. If it isn't, please let me know and I'll update it. Copy and paste the command into your Terminal window, press return, then follow the instructions when prompted, as highlighted in the screenshot below. Note that Terminal does not provide visual feedback when you type your password. Just type it slowly and press return. Once the installation is successful, run the following command: brew doctor If you get Your system is ready to brew, you can move on to. Otherwise, go to the section to learn how to fix errors and warnings you might run into.
Step 3: Install Git is the of choice among many web developers. With Homebrew, installing Git is as easy as this: brew update brew install git Since we just installed Homebrew, we could have skipped brew update, but it's a good habit to run it before installing anything with Homebrew because Homebrew is updated regularly.
To verify: git --version You should get git version 2.3.1 or later. Run brew doctor to make sure everything is still working. If your system is ready to brew, you can move on to.
Step 4: Configure Git with GitHub for Mac Download, install, and launch. If you don't have a GitHub account, click on the Sign Up at GitHub.com link in the app, then come back to the app to complete the setup. I highly recommend that you turn on for your GitHub account. Follow these steps to set up GitHub for Mac when you first launch it: • Click Continue • Enter your username and password, then click Sign In • Enter your two-factor authentication code (if you have it turned on) • Click Continue • Enter an email address that you want to be attached to your commits.