简体   繁体   中英

An error occurred while installing nokogiri (1.6.6.2), and Bundler cannot continue

While executing sudo bundle install i am getting following error. Gem files will remain installed in /Users/madhakul/Documents/Inshort/puurna/vendor/cache/ruby/2.3.0/gems/nokogiri-1.6.6.2 for inspection. Results logged to /Users/madhakul/Documents/Inshort/puurna/vendor/cache/ruby/2.3.0/extensions/universal-darwin-18/2.3.0/nokogiri-1.6.6.2/gem_make.out

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

In Gemfile: roo was resolved to 2.0.0, which depends on

After going through few help materials, installed Developer tools for MacOS 10.14 Mojave but still not able to resolve the issue.

I recently had to install Nokogiri 1.6.6.2 as well and ran into the same issue (also on Mojave 10.14). I tried installing xcode-select first, but that alone didn't solve it. Further down in the install guide (as @xploshioOn linked https://nokogiri.org/tutorials/installing_nokogiri.html ) is where I found the answer that helped me; installing the extra headers.

A temporary workaround to allow previous releases of Nokogiri to build is to install the extra headers package mentioned in the Xcode 10 release notes:

open /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg

That'll open a window where you can then run through the installation prompt for the extra headers to run previous versions of Nokogiri.

brew install libxml2

gem install nokogiri -v '1.6.6.2' -- --use-system-libraries \
  --with-xml2-include=$(brew --prefix libxml2)/include/libxml2

Documentation

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM