You can either install only the Xcode Command Line Tools (instructions below) or reinstall the full Xcode package.
Interesting observation: I did a lot of research and the only difference I found is Metal which is in the Xcode CLT and not in the standalone CLT, there may be other differences but I could not find them.
If your computer already has this software you will see a message warning that XCode CLT is already installed, otherwise it will take a moment to automatically download and install the software.
The installation instructions are different, depending on your operating system; either Microsoft Windows, Mac OS X or Ubuntu Linux.
Apple Command Line Tools install the compiler and adds standard libraries and headers to the system in a package much smaller than xcode (which is several GBs).
With the GCC compiler installed, you can install any Unix system tools you need for software development.
The download and installation takes quite some time, as Xcode is a little over 2GB as of this writing.
As such, if your system environment doesn't match Nokogiri's requirements, compilation of Nokogiri will fail.
The reason to do this is that this is the way to tell your system where Homebrew software can be found on your hard disk.
Before installing Ruby, you'll need to prepare your computer by installing Apple's Xcode Command Line Tools.
MacOS Sierra will alert you when you enter a command in the terminal that requires Xcode Command Line Tools.
High Sierra will alert you when you enter a command in the terminal that requires Xcode Command Line Tools.
The original script was written with the assumption that there would only be one qualifying Xcode Command Line Tools install option available at any one time.
In a recent blog post, Xcode, GCC, and Homebrew, the project maintainer recommends installing the Xcode Command Line Tools because the open source project is unable to duplicate the complete Apple package (notably, the Node software project isn't supported).
Xcode and Xcode command line tools1Can I install Compass in Yosemite WITHOUT installing Xcode or Command Line Developer Tools?
You can use Homebrew to install gpg, an encryption program used to check the security of the RVM download.
In the blog post, Xcode, GCC, and Homebrew, the project maintainer recommends installing the Xcode Command Line Tools because the open source project is unable to duplicate the complete Apple package (notably, the Node software project isn't supported).
It required a huge download of the full Xcode package from the Mac App Store or registration as an Apple developer for a smaller Command Line Tools package.
Compiling software on OS X requires XCode CLT, and installing R requires compiling at some steps, so there is no escape from this part.
You need to install Apple's Xcode Command Line Tools to get the Unix tools needed to install Ruby and develop with Rails.
We call the command line the shell because it is the outer layer of the operating system's internal mechanisms (which we call the kernel).