Installing Nokogiri Fails on OS X Mavericks

1910798

So, I upgraded to OS X Mavericks this weekend. The upgrade went smooth and everything had been running extremely fine for me until today. I wanted to install the Ruby OpenGraph gem for a project I was working on. This gem depends on the Nokogiri Gem. However, unfortunately I was facing this issue which was failing on building of Nokogiri Native Extensions as follows.

After seeing this error, I was pretty much like:

tumblr_melfmngawK1qjf2mz

So, i checked the gem_make.out where the errors were logged and figured my comman line developer tools in this new version of OS X were pooched/missing. There is a command line tool available called xcode-select which is used to switch between different versions of XCode and Xcode in this new version of OS X comes with an update (Version 5.0.1). This little tool can be used to install the latest command line developer tools.

This command did it for me:

Screen Shot 2013-10-28 at 12.07.51 PMScreen Shot 2013-10-28 at 11.16.43 AM

 

After downloading and installing the new Command Line Developer Tools:

tumblr_lznmjaWT4S1r50pfh

If this didn’t worked for you, a couple people reported that their gcc was missing. Consider following this Stack Overflow question if that’s the case: http://stackoverflow.com/a/19643909/472869

PS: I had a few warnings after installing the gem which I’ve left out for brevity sake. These were just some encoding warnings – Nothing serious. I’m hoping there won’t be any major¬†issues ¬†with Nokogiri on Mavericks.

36 thoughts on “Installing Nokogiri Fails on OS X Mavericks

  1. I would reach through the internet and hug you if i could. I have been fighting with this for so long! Thank you so much for posting this!

  2. “Can’t install the software because it is not currently available from the Software Update server.” See this message consistently.

  3. unfortunatly, new major issues with Nokogiri on Mavericks…. seems to be the case with each new XCode release now …

  4. For those having issues related to creating the native extensions (libiconv especially) I’d like to share a Ruby script that acts as a self-contained solution and should work on any recent Mac OS X / Homebrew installations. It can configure and install using Bundler if you want–see the gist for details.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">