1、Installing nokogiri 1.8.5 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
An error occurred while installing nokogiri (1.8.5), and Bundler cannot continue.
Make sure that gem install nokogiri -v '1.8.5' --source 'http://gems.ruby-china.com/'
succeeds before bundling.
解决
- brew install libxml2 libxslt
- gem install nokogiri -- --use-system-libraries --with-xml2-include=
brew --prefix
/opt/libxml2/include/libxml2 --with-xml2-lib=brew --prefix
/opt/libxml2/lib --with-xslt-dir=brew --prefix
/opt/libxslt --with-iconv-include=brew --prefix
/opt/libiconv/include/
2、无法找到openssl
解决
进入ruby的安装安装包,重新设置openssl的配置路径,重新编译安装ruby
./configure --with-openssl-dir=/usr/local/opt/openssl
make
make install
网友评论