Press "Enter" to skip to content

Nokogiri Warning (MacOSX)

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

gem uninstall nokogiri libxml-ruby
brew update
brew uninstall libxml2
brew install libxml2 --with-xml2-config
brew install libxslt

วิธีแรก

gem install nokogiri -- --with-xml2-include=/usr/local/Cellar/libxml2/2.9.1/include/libxml2 --with-xml2-lib=/usr/local/Cellar/libxml2/2.9.1/lib --with-xslt-dir=/usr/local/Cellar/libxslt/1.1.28/

### เท่าที่ผมลองแล้วจะมี error แล้วไม่สามารถแก้ได้

วีธีที่สอง

bundle config build.nokogiri --with-xml2-include=/usr/local/Cellar/libxml2/2.9.1/include/libxml2/--with-xml2-lib=/usr/local/Cellar/libxml2/2.9.1/lib/ --with-xslt-dir=/usr/local/Cellar/libxslt/1.1.28/

bundle install

ถ้าเกิด Errno::EACCES: Permission denied

Errno::EACCES: Permission denied

ก็ให้มาใช้ super user ในการ install แทน

sudo bundle install

Your bundle is complete!

#### วิธีนี้แก้ได้สำเร็จครับ

Arnon Hongklay
Arnon Hongklay

View all posts

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.