Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 652
Madhavarao Kulkarni Avatar asked Nov 03 '18 17:11

Madhavarao Kulkarni


People also ask

Can t install Nokogiri?

Solution. Uninstall all versions of Nokogiri on your system, and then re-resolve your dependencies (using bundle or gem install ). This error can occur when a version of Nokogiri installed for a different version of Ruby is used by an unsupported version of Ruby. For example, if Nokogiri v1.

Is Nokogiri a Ruby gem?

One of the best gems for Ruby on Rails is Nokogiri which is a library to deal with XML and HTML documents. The most common use for a parser like Nokogiri is to extract data from structured documents.

What is GEM Nokogiri?

The Nokogiri gem is an incredible open-source tool that parses HTML and XML data. It is one of the most widely used gems available, and it can really take your Ruby app to another level for data with its ability to help you intuitively scrape websites.


1 Answers

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.

like image 180
Tim Higgins Avatar answered Sep 30 '22 15:09

Tim Higgins