LoginSignup
15
14

More than 5 years have passed since last update.

NokogiriのWarningが出てつらかったので消した

Posted at
  • rbenv使っている
    • bundle installするとvendor/bundleにアレされるようにしてる
  • rails4.1にした

そしたら、こんなのが出てた

WARNING: Nokogiri was built against LibXML version 2.8.0, but has dynamically loaded 2.9.1

or

WARNING: Nokogiri was built against LibXML version 2.9.1, but has dynamically loaded 2.9.0

色々ググッた結果、以下で解決した

rm vendor/bundle vendor/bin
brew update
brew uninstall libxml2
brew install libxml2 --with-xml2-config
brew link --force libxml2

brew install libxslt
brew link --force libxslt

brew install libiconv
brew link --force libiconv

bundle config build.nokogiri -- --with-xml2-dir=/usr/local --with-xslt-dir=/usr/local --with-iconv-dir=/usr/local
bundle install
15
14
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
15
14