BundlerにNokogiriビルド時のオプションとして、--use-system-librariesと--with-xml2-includeを設定します。 $ bundle config build.nokogiri --use-system-libraries --with-xml2-include=$(brew --prefix libxml2)/include/libxml2 Installing nokogiri 1.6.8.1 with native extensions Gem::Ext::BuildError: ERROR: Failed to build gem native extension. current directory: /private/tmp/nokogiri/vendor/bundle/gems/nokogiri-1.6.8.1/ext/nokogi