follow me icons

Monday, January 21, 2019

Nokogiri ERROR failed to build GEM native extension on MAC OSX




Fetching nokogiri 1.8.5
Installing nokogiri 1.8.5 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

    current directory: /Users/qablog/cucumber/vendor/ruby/2.3.0/gems/nokogiri-1.8.5/ext/nokogiri
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/bin/ruby -r ./siteconf20190121-32936-i6yrat.rb extconf.rb
mkmf.rb can't find header files for ruby at /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/include/ruby.h

extconf failed, exit code 1

Gem files will remain installed in /Users/qablog/cucumber/vendor/ruby/2.3.0/gems/nokogiri-1.8.5 for inspection.
Results logged to /Users/qablog/cucumbe/vendor/ruby/2.3.0/extensions/universal-darwin-18/2.3.0/nokogiri-1.8.5/gem_make.out

An error occurred while installing nokogiri (1.8.5), and Bundler cannot continue.
Make sure that `gem install nokogiri -v '1.8.5' --source 'http://rubygems.org/'` succeeds before bundling.

In Gemfile:
  capybara was resolved to 3.12.0, which depends on
    xpath was resolved to 3.2.0, which depends on
      nokogiri


Solution: Install xcode command line developer tools
sudo xcode-select --install
Password:
xcode-select: note: install requested for command line developer tools

Fetching nokogiri 1.8.5
Installing nokogiri 1.8.5 with native extensions
Fetching rack 2.0.6
Installing rack 2.0.6
Fetching rack-test 1.1.0
Installing rack-test 1.1.0
Fetching regexp_parser 1.3.0
Installing regexp_parser 1.3.0
Fetching xpath 3.2.0
Installing xpath 3.2.0
Fetching capybara 3.12.0
Installing capybara 3.12.0
Fetching ffi 1.9.25
Installing ffi 1.9.25 with native extensions
Fetching childprocess 0.9.0
Installing childprocess 0.9.0
Fetching cucumber-tag_expressions 1.1.1
Installing cucumber-tag_expressions 1.1.1
Fetching gherkin 5.1.0
Installing gherkin 5.1.0
Fetching cucumber-core 3.2.1
Installing cucumber-core 3.2.1
Fetching cucumber-expressions 6.0.1
Installing cucumber-expressions 6.0.1
Fetching cucumber-wire 0.0.1
Installing cucumber-wire 0.0.1
Fetching diff-lcs 1.3
Installing diff-lcs 1.3
Fetching multi_json 1.13.1
Installing multi_json 1.13.1
Fetching multi_test 0.1.2
Installing multi_test 0.1.2
Fetching cucumber 3.1.2
Installing cucumber 3.1.2
Fetching rubyzip 1.2.2
Installing rubyzip 1.2.2
Fetching roo 2.7.1
Installing roo 2.7.1
Fetching rspec-support 3.8.0
Installing rspec-support 3.8.0
Fetching rspec-core 3.8.0
Installing rspec-core 3.8.0
Fetching rspec-expectations 3.8.2
Installing rspec-expectations 3.8.2
Fetching rspec-mocks 3.8.0
Installing rspec-mocks 3.8.0
Fetching rspec 3.8.0
Installing rspec 3.8.0
Fetching rspec-retry 0.6.1
Installing rspec-retry 0.6.1
Fetching selenium-webdriver 3.141.0
Installing selenium-webdriver 3.141.0
Bundle complete! 7 Gemfile dependencies, 34 gems now installed.
Bundled gems are installed into `./vendor`