2013-07-09 36 views
0

我试图在OS X 10.9上运行 “捆绑更新”,但它与以下错误消息失败:束失败

Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension. 

    /Users/FrancisO/.rvm/rubies/ruby-1.9.3-p392/bin/ruby extconf.rb 
checking for ruby/util.h... *** 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. 

Provided configuration options: 
    --with-opt-dir 
    --with-opt-include 
    --without-opt-include=${opt-dir}/include 
    --with-opt-lib 
    --without-opt-lib=${opt-dir}/lib 
    --with-make-prog 
    --without-make-prog 
    --srcdir=. 
    --curdir 
    --ruby=/Users/FrancisO/.rvm/rubies/ruby-1.9.3-p392/bin/ruby 
/Users/FrancisO/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/mkmf.rb:381:in `try_do': The compiler failed to generate an executable file. (RuntimeError) 
You have to install development tools first. 
    from /Users/FrancisO/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/mkmf.rb:506:in `try_cpp' 
    from /Users/FrancisO/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/mkmf.rb:931:in `block in have_header' 
    from /Users/FrancisO/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/mkmf.rb:790:in `block in checking_for' 
    from /Users/FrancisO/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/mkmf.rb:284:in `block (2 levels) in postpone' 
    from /Users/FrancisO/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/mkmf.rb:254:in `open' 
    from /Users/FrancisO/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/mkmf.rb:284:in `block in postpone' 
    from /Users/FrancisO/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/mkmf.rb:254:in `open' 
    from /Users/FrancisO/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/mkmf.rb:280:in `postpone' 
    from /Users/FrancisO/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/mkmf.rb:789:in `checking_for' 
    from /Users/FrancisO/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/mkmf.rb:930:in `have_header' 
    from extconf.rb:14:in `<main>' 


Gem files will remain installed in /Users/FrancisO/.rvm/gems/ruby-1.9.3-p392/gems/bcrypt-ruby-3.1.0 for inspection. 
Results logged to /Users/FrancisO/.rvm/gems/ruby-1.9.3-p392/gems/bcrypt-ruby-3.1.0/ext/mri/gem_make.out 

An error occurred while installing bcrypt-ruby (3.1.0), and Bundler cannot continue. 
Make sure that `gem install bcrypt-ruby -v '3.1.0'` succeeds before bundling. 

的Xcode 5(预览版3)有已经安装,命令行工具也是如此。下面是一些相关的信息:

gcc --version 
Configured with: --prefix=/Library/Developer/CommandLineTools/usr --with-gxx-include-dir=/Library/Developer/CommandLineTools/SDKs/MacOSX10.9.sdk/usr/include/c++/4.2.1 
Apple LLVM version 5.0 (clang-500.1.61) (based on LLVM 3.3svn) 
Target: x86_64-apple-darwin13.0.0 
Thread model: posix 

brew update 
Already up-to-date. 

rvm requirements 
Installing requirements for osx, might require sudo password. 
Certificates in '/usr/local/etc/openssl/cert.pem' already are up to date. 
Requirements installation successful. 
我并没有安装Ruby的任何版本,到目前为止(使用RVM)的任何问题

。有人有什么主意吗?

感谢, 弗朗西斯

+0

你有没有解决这个问题? – MichaelScaria

回答

5

确保您的默认红宝石是1.9.3-P448。 rvm --default use 1.9.3-p448

+0

哇!我猜p392是错误的,因为我甚至无法将它安装在干净的小牛队中。 P448就像一个魅力。谢谢! –

0

我有同样的问题,问题是升级到OSX 10.9(小牛)我没有确认我同意Xcode的许可协议。如果您键入以下

gcc --version 

你应该得到“你没有同意Xcode的许可协议。”

一旦达成协议,一切运行良好

3

对我来说,问题是由安装的Xcode命令行工具解决。在终端运行:

xcode-select --install 

然后在弹出窗口中选择安装。

我最近安装了xcode 5,我想我需要在安装后运行上面的命令,并且我没有以某种方式导致bundle update失败。