我试图在没有互联网功能的64位Windows机器上安装Nokogiri 1.7.1。我下载了Nokogiri gem和必要的库(libxml2,libxslt,iconv,zlib)并将它们传输到无互联网的机器上。我现在正尝试使用此命令正确运行gem install:
gem install --local <path to nokogiri-1.7.1.gem> -- --use-system-libraries \
--with-xml2-lib=<path to xml2path>\lib --with-xml2-include=<path to xml2path>\include\libxml2 \
--with-xslt-lib=<path to xsltpath>\lib --with-xslt-include=<path to xsltpath>\include\libxslt \
--with-iconv-dir=<path to iconv> --with-zlib-dir=<path to zlib>
但我一直得到同样的错误:
The compiler failed to generate an executable file. You have to install development tools first.
以及其他人在无法建立Nokogiri时获得的相同消息。我使用的是libxml2 2.9.2和libxslt 1.1.28