2016-02-02 58 views
0

嘗試安裝Nokogiri時出現上述錯誤。嘗試安裝Nokogiri時出現Rails開發人員工具

我認爲這個問題與x-code和/或rvm有關。我的想法是,我需要卸載並重新安裝一個或兩個才能使其工作。

我的問題是基於下面的錯誤你相信我需要卸載並重新安裝xcode和/或rvm來解決這個問題?有什麼你會先嚐試嗎?

任何意見/幫助非常感謝。

下面是錯誤,我得到

$gem install nokogiri -- --use-system-libraries 
Building native extensions with: '--use-system-libraries' 
This could take a while... 
ERROR: Error installing nokogiri: 
    ERROR: Failed to build gem native extension. 

    /Users/jackburum/.rbenv/versions/2.1.2/bin/ruby -r ./siteconf20160201-5728-joih4p.rb extconf.rb --use-system-libraries 
checking if the C compiler accepts ... *** 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. 

/Users/jackburum/.rbenv/versions/2.1.2/lib/ruby/2.1.0/mkmf.rb:456:in `try_do': The compiler failed to generate an executable file. (RuntimeError) 
You have to install development tools first. 
    from /Users/jackburum/.rbenv/versions/2.1.2/lib/ruby/2.1.0/mkmf.rb:571:in `block in try_compile' 
    from /Users/jackburum/.rbenv/versions/2.1.2/lib/ruby/2.1.0/mkmf.rb:522:in `with_werror' 
    from /Users/jackburum/.rbenv/versions/2.1.2/lib/ruby/2.1.0/mkmf.rb:571:in `try_compile' 
    from extconf.rb:80:in `nokogiri_try_compile' 
    from extconf.rb:87:in `block in add_cflags' 
    from /Users/jackburum/.rbenv/versions/2.1.2/lib/ruby/2.1.0/mkmf.rb:621:in `with_cflags' 
    from extconf.rb:86:in `add_cflags' 
    from extconf.rb:336:in `<main>' 

extconf failed, exit code 1 

Gem files will remain installed in /Users/jackburum/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/nokogiri-1.6.7.2 for inspection. 
Results logged to /Users/jackburum/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/extensions/x86_64-darwin-14/2.1.0-static/nokogiri-1.6.7.2/gem_make.out 

回答

0

如果你有這個問題,我解決它只是從我的本地應用補償> Xcode中打開並同意新的條款。然後我運行捆綁軟件,我的應用程序開始工作

相關問題