在Mac OS Sierra 10.12上安装Nokogiri(1.6.8.1)时遇到问题.
我try 使用brew install libxml2 libxslt
,然后使用命令行选项引用安装目录,但没有帮助.
在Mac OS Sierra 10.12上安装Nokogiri(1.6.8.1)时遇到问题.
我try 使用brew install libxml2 libxslt
,然后使用命令行选项引用安装目录,但没有帮助.
Open Xcode and, from the menu XCode
-> Preferences
update your Command Line Tools (Xcode 8.0).
然后做:
bundle config build.nokogiri --use-system-libraries=true --with-xml2-include="$(xcrun --show-sdk-path)"/usr/include/libxml2
bundle install
或者只是:
gem install nokogiri -v 1.6.8.1 -- --use-system-libraries=true --with-xml2-include="$(xcrun --show-sdk-path)"/usr/include/libxml2