Skip to content

Instantly share code, notes, and snippets.

@steveadams
Created May 6, 2019 12:35
Show Gist options
  • Save steveadams/906de89a74fdd052b8fe021db1a5ab6c to your computer and use it in GitHub Desktop.
Save steveadams/906de89a74fdd052b8fe021db1a5ab6c to your computer and use it in GitHub Desktop.
Installing nokogiri 1.10.3 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
current directory: /Users/steve/.rbenv/versions/2.6.2/lib/ruby/gems/2.6.0/gems/nokogiri-1.10.3/ext/nokogiri
/Users/steve/.rbenv/versions/2.6.2/bin/ruby -I /Users/steve/.rbenv/versions/2.6.2/lib/ruby/2.6.0 -r ./siteconf20190506-30612-1xpzioz.rb extconf.rb
checking if the C compiler accepts -I /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/libxml2... *** 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.
Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/Users/steve/.rbenv/versions/2.6.2/bin/$(RUBY_BASE_NAME)
--help
--clean
/Users/steve/.rbenv/versions/2.6.2/lib/ruby/2.6.0/mkmf.rb:467:in `try_do': The compiler failed to generate an executable file. (RuntimeError)
You have to install development tools first.
from /Users/steve/.rbenv/versions/2.6.2/lib/ruby/2.6.0/mkmf.rb:585:in `block in try_compile'
from /Users/steve/.rbenv/versions/2.6.2/lib/ruby/2.6.0/mkmf.rb:532:in `with_werror'
from /Users/steve/.rbenv/versions/2.6.2/lib/ruby/2.6.0/mkmf.rb:585:in `try_compile'
from extconf.rb:138:in `nokogiri_try_compile'
from extconf.rb:162:in `block in add_cflags'
from /Users/steve/.rbenv/versions/2.6.2/lib/ruby/2.6.0/mkmf.rb:643:in `with_cflags'
from extconf.rb:161:in `add_cflags'
from extconf.rb:416:in `<main>'
To see why this extension failed to compile, please check the mkmf.log which can be found here:
/Users/steve/.rbenv/versions/2.6.2/lib/ruby/gems/2.6.0/extensions/x86_64-darwin-18/2.6.0-static/nokogiri-1.10.3/mkmf.log
extconf failed, exit code 1
Gem files will remain installed in /Users/steve/.rbenv/versions/2.6.2/lib/ruby/gems/2.6.0/gems/nokogiri-1.10.3 for inspection.
Results logged to /Users/steve/.rbenv/versions/2.6.2/lib/ruby/gems/2.6.0/extensions/x86_64-darwin-18/2.6.0-static/nokogiri-1.10.3/gem_make.out
An error occurred while installing nokogiri (1.10.3), and Bundler cannot continue.
Make sure that `gem install nokogiri -v '1.10.3' --source 'https://rubygems.org/'` succeeds before bundling.
In Gemfile:
jquery-minicolors-rails was resolved to 2.2.6.1, which depends on
rails was resolved to 5.2.2, which depends on
actioncable was resolved to 5.2.2, which depends on
actionpack was resolved to 5.2.2, which depends on
actionview was resolved to 5.2.2, which depends on
rails-dom-testing was resolved to 2.0.3, which depends on
nokogiri
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment