Error installing Nokogiri on bundle install but already installed

后端 未结 7 960
忘了有多久
忘了有多久 2020-12-07 17:34

I\'m having issues with bundling my Gemfile. I have Nokogiri installed already yet when I run bundle install it fails to load Nokogiri.

Installing Nok

相关标签:
7条回答
  • 2020-12-07 17:45

    On Mac OSX, you can execute below commands to fix this nokogiri gem issue.

    xcode-select --install
    gem install nokogiri
    bundle install
    
    0 讨论(0)
  • 2020-12-07 17:54

    I had the same issue, and I solved it with this:

    sudo yum install patch
    
    0 讨论(0)
  • 2020-12-07 17:55
    brew install libxml2
    bundle config build.nokogiri "--use-system-libraries --with-xml2-include=/usr/local/opt/libxml2/include/libxml2"
    bundle install
    

    it's work for me

    (source here)

    0 讨论(0)
  • 2020-12-07 17:55

    I noticed that I hadn't installed tar on my system. After running dnf install tar, gem install nokogiri went fine.

    0 讨论(0)
  • 2020-12-07 17:59
    • Issue is the location that bundler checking the Nokogiri.
    • Check which version of ruby using by your IDE and whether it is same as the global ruby version.
    • This fixed my issue which had with RubyMine.
    0 讨论(0)
  • 2020-12-07 18:01

    Try running bundle config build.nokogiri --use-system-libraries as noted in the bundler output. Then re-run bundle.

    0 讨论(0)
提交回复
热议问题