2016-02-02 54 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中打开并同意新的条款。然后我运行捆绑软件,我的应用程序开始工作

相关问题