On OSX Mavericks, using the latest Xcode (5.5) I’ve seen this error.  I tried a few solutions around the net, but only one worked for me.

The solution that worked for me was installing the gems that throw this error as:

ARCHFLAGS=-Wno-error=unused-command-line-argument-hard-error-in-future gem install <gemName>

For me, this solved my problems with Cucumber and Watir-Webdriver gems.

Other people had success with

sudo xcode-select --install

This didn’t work for me at all.

For reference: http://stackoverflow.com/questions/23429145/error-failed-to-build-gem-native-extension-ruby-extconf-rb-mac-osx

Leave a Reply

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