Error installing Nokogiri 1.5.0 with rails 3.1.0 and ubuntu

前端 未结 8 1205
[愿得一人]
[愿得一人] 2020-11-29 03:38

Here is the error running bundle install vendor/gems on server:

Installing nokogiri (1.5.0) with native extensions
Gem::Installer::ExtensionBuildError: ERROR         


        
相关标签:
8条回答
  • 2020-11-29 03:46

    When I used this code I got another error:

    ERROR:  Error installing disposable:
        invalid gem: package is corrupt, exception while verifying: undefined method `size' for nil:NilClass (NoMethodError) in /home/admin/.rvm/gems/ruby-2.1.3@lol/cache/nokogiri-1.6.4.1.gem
    

    I tried many different solutions, but helped med:

    $ rm /home/admin/.rvm/gems/ruby-2.1.3@lol/cache/nokogiri-1.6.4.1.gem
    $ gem update
    $ gem install nokogiri
    

    Other commands that can help:

    sudo apt-get install synaptic
    sudo apt-get update
    sudo apt-get install qt4-dev-tools libqt4-dev libqt4-core libqt4-gui
    sudo apt-get install build-essential
    sudo apt-get install "^libxcb.*" libx11-xcb-dev libglu1-mesa-dev libxrender-dev
    
    0 讨论(0)
  • 2020-11-29 03:49

    Just do this:

    sudo apt-get install libxslt-dev libxml2-dev libxml2
    

    then type this in terminal (linux) / cmd(windows):

    export NOKOGIRI_USE_SYSTEM_LIBRARIES=true
    
    0 讨论(0)
  • 2020-11-29 03:55

    It looks like a gem dependency error.

    You need to run the bundle update command. It will resolve dependencies:

    bundle update
    
    0 讨论(0)
  • 2020-11-29 04:04

    You are missing some packages. Try running this (Linux only):

    $ sudo apt-get install libxslt-dev libxml2-dev
    
    0 讨论(0)
  • 2020-11-29 04:06

    You need to install libxml2.

    On Mac OS, using homebrew, this will be:

    brew install libxml2
    

    See http://nokogiri.org/tutorials/installing_nokogiri.html.

    0 讨论(0)
  • 2020-11-29 04:07

    Try this one if others doesn't work, its really work on me. Devtools for CentOS

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