在Curb Gem上捆绑安装失败 - Mac OS X 10.8.2

时间:2012-10-05 15:51:47

标签: ruby gem bundler osx-mountain-lion curb

当我尝试运行bundle install时,这是我遇到的问题:

Installing curb (0.8.1) with native extensions 
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.

        /Users/dennismonsewicz/.rvm/rubies/ruby-1.9.3-p125/bin/ruby extconf.rb 
checking for curl-config... yes
checking for curlinfo_redirect_time... *** 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/dennismonsewicz/.rvm/rubies/ruby-1.9.3-p125/bin/ruby
    --with-curl-dir
    --without-curl-dir
    --with-curl-include
    --without-curl-include=${curl-dir}/include
    --with-curl-lib
    --without-curl-lib=${curl-dir}/lib
/Users/dennismonsewicz/.rvm/rubies/ruby-1.9.3-p125/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/dennismonsewicz/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/1.9.1/mkmf.rb:491:in `block in try_compile'
    from /Users/dennismonsewicz/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/1.9.1/mkmf.rb:443:in `with_werror'
    from /Users/dennismonsewicz/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/1.9.1/mkmf.rb:491:in `try_compile'
    from extconf.rb:52:in `block in have_constant'
    from /Users/dennismonsewicz/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/1.9.1/mkmf.rb:790:in `block in checking_for'
    from /Users/dennismonsewicz/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/1.9.1/mkmf.rb:284:in `block (2 levels) in postpone'
    from /Users/dennismonsewicz/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/1.9.1/mkmf.rb:254:in `open'
    from /Users/dennismonsewicz/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/1.9.1/mkmf.rb:284:in `block in postpone'
    from /Users/dennismonsewicz/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/1.9.1/mkmf.rb:254:in `open'
    from /Users/dennismonsewicz/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/1.9.1/mkmf.rb:280:in `postpone'
    from /Users/dennismonsewicz/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/1.9.1/mkmf.rb:789:in `checking_for'
    from extconf.rb:44:in `have_constant'
    from extconf.rb:62:in `<main>'

我正在使用RVM运行ruby 1.9.3p125并重新安装curl(本地)并仍然遇到同样的问题...我已经尝试了解决此问题的所有内容,但不能似乎让问题平息了。是否有其他人遇到过这个问题并成功修复过它?

1 个答案:

答案 0 :(得分:3)

当您看到此消息时,您需要安装XCode命令行工具包:

You have to install development tools first.

这些可从developer download site获得。