我正在尝试在Mac(优胜美地)上安装Rails。我经历了几个SO问题,用Homebrew,RVM重新安装libxml2,以及更新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
构建时遇到问题。
请尝试以下步骤。这应该适用于优胜美地:
brew install libxml2
bundle config build.nokogiri "--use-system-libraries --with-xml2-include=/usr/local/opt/libxml2/include/libxml2"
bundle install
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句