-1

nokogiri install failure

What I want

Install ruby on rails

error

Gemfile is done, and I want to install rails.
Obaying the document, bundle install --path=vendor/bundle
but An error occurred while installing nokogiri (1.10.3), and Bundler cannot continue. The error is here.

Make sure that `gem install nokogiri -v '1.10.3'
--source 'https://rubygems.org/'` succeeds before bundling.
answer

I searched google for the error message, then find
[incompatible-library-version] (Incompatible library version: nokogiri.bundle requires version 11.0.0 or later, but libxml2.2.dylib)

 sudo gem uninstall nokogiri
 gem uninstall nokogiri

sudo gem uninstall nokogiri I obaied the command but it cause new error:

Permission denied @ rb_sysopen - /usr/local/lib/ruby/gems/2.6.0/gems/nokogiri-1.10.3/LICENSE-DEPENDENCIES.md

There 1614 lines dependencies document, but I cannot find out what to do next.

Please help me (><)

KAEDE
  • 340
  • 3
  • 10

1 Answers1

0

Try

sudo chown -R $USER /usr/local/lib/ruby

And bundle install again or gem install again and netter not use sudo on gem install

Brooklyn
  • 73
  • 1
  • 12
YOU
  • 120,166
  • 34
  • 186
  • 219