由于libxml2未正确检测,无法安装Rails



我试图在我的Mac (Yosemite)上安装Rails。我已经经历了几个SO问题,重新安装libxml2与Homebrew和RVM,并更新Ruby等,到目前为止没有任何工作。我的libxml2版本是2.9.2.

ERROR: Error installing rails:
ERROR: Failed to build gem native extension.
Building nokogiri using system libraries.
libxml2 version 2.6.21 or later is required!
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers.  Check the mkmf.log file for more details.  You may
need configuration options.

接下来我应该尝试什么?

您的nokogiri大楼有问题。

尝试以下步骤。这应该适用于Yosemite:

brew install libxml2
bundle config build.nokogiri "--use-system-libraries --with-xml2-include=/usr/local/opt/libxml2/include/libxml2"
bundle install

相关内容

  • 没有找到相关文章

最新更新