我在Mac OS Sierra 10.12上安装Nokogiri(1.6.8.1)时遇到麻烦。
我尝试使用brew install libxml2 libxslt
,然后使用命令行选项引用安装目录,但这无济于事。
打开Xcode,然后从菜单XCode
-> Preferences
更新您的命令行工具(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
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句