2015-08-27 60 views
1

我試圖在我的Mac(Yosemite)上安裝Rails。我已經經歷了幾個SO問題,用Homebrew和RVM重新安裝libxml2,以及更新Ruby等,到目前爲止沒有任何工作。我的libxml2版本是2.9.2。由於libxml2未正確檢測到而無法安裝Rails

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. 

接下來我應該嘗試什麼?

+0

可能重複[問題捆綁安裝引入nokogiri安裝(http://stackoverflow.com/questions/23668684/issue-installing-nokogiri-in-bundle-install) –

回答

1

您有nokogiri建築問題。

請嘗試以下步驟。這應該約塞米蒂工作:

brew install libxml2 

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

bundle install