Problem
Fail to install Cucumber
% sudo gem install cucumber
Building native extensions. This could take a while...
ERROR: Error installing cucumber:
ERROR: Failed to build gem native extension.
/Users/XXXX/.rbenv/versions/1.9.3-p194/bin/ruby extconf.rb
checking for main() in -lc... *** 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.
Solution
Install gcc
- Download Xcode from App Store
- Xcode -> Preferences -> Downloads -> Command Line Tools