2013-07-09 34 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失敗。