. Each attempt gave the same error:
ERROR: Error installing nokogiri:
ERROR: Failed to build gem native extension.
/Users/jackrg/.rbenv/versions/2.1.2/bin/ruby extconf.rb --with-xml2-include=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/usr/include/libxml2 --use-system-libraries
checking if the C compiler accepts ... *** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers. Check the mkmf.log file for more details. You may
need configuration options.
Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/Users/jackrg/.rbenv/versions/2.1.2/bin/ruby
--help
--clean
/Users/jackrg/.rbenv/versions/2.1.2/lib/ruby/2.1.0/mkmf.rb:456:in `try_do': The compiler failed to generate an executable file. (RuntimeError)
You have to install development tools first.
from /Users/jackrg/.rbenv/versions/2.1.2/lib/ruby/2.1.0/mkmf.rb:571:in `block in try_compile'
from /Users/jackrg/.rbenv/versions/2.1.2/lib/ruby/2.1.0/mkmf.rb:522:in `with_werror'
from /Users/jackrg/.rbenv/versions/2.1.2/lib/ruby/2.1.0/mkmf.rb:571:in `try_compile'
from extconf.rb:80:in `nokogiri_try_compile'
from extconf.rb:87:in `block in add_cflags'
from /Users/jackrg/.rbenv/versions/2.1.2/lib/ruby/2.1.0/mkmf.rb:621:in `with_cflags'
from extconf.rb:86:in `add_cflags'
from extconf.rb:337:in `<main>'
extconf failed, exit code 1
All this after installing the latest and greatest Command Line Tools.