Gem 安装 Gem 包 capybara-webkit 失败

ranmocy · 2012年02月16日 · 最后由 ranmocy 回复于 2012年02月16日 · 4006 次阅读

hi, all 我是 MacbookAIr4,2 + Lion10.7.3。 原本的 gem 出了很多问题,所以决心重装 ruby 环境。 把 XCode 卸载 sudo /Developer/Library/uninstall-devtools –mode=all 安装 osx-gcc-installer https://github.com/kennethreitz/osx-gcc-installer 安装 homebrew /usr/bin/ruby -e "$(curl -fsSL https://raw.github.com/gist/323731)" 安装 rvm bash -s stable < <(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer) 安装补丁版的 1.9.3 curl https://raw.github.com/gist/1688857/rbenv.sh | sh

bundle install 会失败错误信息在后面,有人能给些什么建议么?

~/.gemrc

---
:sources:
- http://rubygems.org/
#- http://ruby.taobao.org/
#:backtrace: false
#:benchmark: false
#:bulk_threshold: 1000
#:update_sources: true
#:verbose: true
gem: --no-ri --no-rdoc

bundle install 的错误信息

Installing capybara-webkit (0.8.0) with native extensions Unfortunately, a fatal error has occurred. Please report this error to the Bundler issue tracker at https://github.com/carlhuda/bundler/issues so that we can fix it. Thanks!
/Users/ranmocy/.rvm/rubies/ruby-1.9.3-p0-perf/lib/ruby/site_ruby/1.9.1/rubygems/installer.rb:552:in `rescue in block in build_extensions': ERROR: Failed to build gem native extension. (Gem::Installer::ExtensionBuildError)

        /Users/ranmocy/.rvm/rubies/ruby-1.9.3-p0-perf/bin/ruby extconf.rb 


Gem files will remain installed in /Users/ranmocy/.rvm/gems/ruby-1.9.3-p0-perf/gems/capybara-webkit-0.8.0 for inspection.
Results logged to /Users/ranmocy/.rvm/gems/ruby-1.9.3-p0-perf/gems/capybara-webkit-0.8.0/./gem_make.out
    from /Users/ranmocy/.rvm/rubies/ruby-1.9.3-p0-perf/lib/ruby/site_ruby/1.9.1/rubygems/installer.rb:530:in `block in build_extensions'
    from /Users/ranmocy/.rvm/rubies/ruby-1.9.3-p0-perf/lib/ruby/site_ruby/1.9.1/rubygems/installer.rb:505:in `each'
    from /Users/ranmocy/.rvm/rubies/ruby-1.9.3-p0-perf/lib/ruby/site_ruby/1.9.1/rubygems/installer.rb:505:in `build_extensions'
    from /Users/ranmocy/.rvm/rubies/ruby-1.9.3-p0-perf/lib/ruby/site_ruby/1.9.1/rubygems/installer.rb:180:in `install'
    from /Users/ranmocy/.rvm/gems/ruby-1.9.3-p0-perf/gems/bundler-1.1.rc.7/lib/bundler/source.rb:90:in `block in install'
    from /Users/ranmocy/.rvm/gems/ruby-1.9.3-p0-perf/gems/bundler-1.1.rc.7/lib/bundler/rubygems_integration.rb:82:in `preserve_paths'
    from /Users/ranmocy/.rvm/gems/ruby-1.9.3-p0-perf/gems/bundler-1.1.rc.7/lib/bundler/source.rb:89:in `install'
    from /Users/ranmocy/.rvm/gems/ruby-1.9.3-p0-perf/gems/bundler-1.1.rc.7/lib/bundler/installer.rb:73:in `block in install_gem_from_spec'
    from /Users/ranmocy/.rvm/gems/ruby-1.9.3-p0-perf/gems/bundler-1.1.rc.7/lib/bundler/rubygems_integration.rb:97:in `with_build_args'
    from /Users/ranmocy/.rvm/gems/ruby-1.9.3-p0-perf/gems/bundler-1.1.rc.7/lib/bundler/installer.rb:72:in `install_gem_from_spec'
    from /Users/ranmocy/.rvm/gems/ruby-1.9.3-p0-perf/gems/bundler-1.1.rc.7/lib/bundler/installer.rb:56:in `block in run'
    from /Users/ranmocy/.rvm/gems/ruby-1.9.3-p0-perf/gems/bundler-1.1.rc.7/lib/bundler/installer.rb:55:in `run'
    from /Users/ranmocy/.rvm/gems/ruby-1.9.3-p0-perf/gems/bundler-1.1.rc.7/lib/bundler/installer.rb:12:in `install'
    from /Users/ranmocy/.rvm/gems/ruby-1.9.3-p0-perf/gems/bundler-1.1.rc.7/lib/bundler/cli.rb:220:in `install'
    from /Users/ranmocy/.rvm/gems/ruby-1.9.3-p0-perf/gems/bundler-1.1.rc.7/lib/bundler/vendor/thor/task.rb:22:in `run'
    from /Users/ranmocy/.rvm/gems/ruby-1.9.3-p0-perf/gems/bundler-1.1.rc.7/lib/bundler/vendor/thor/invocation.rb:118:in `invoke_task'
    from /Users/ranmocy/.rvm/gems/ruby-1.9.3-p0-perf/gems/bundler-1.1.rc.7/lib/bundler/vendor/thor.rb:263:in `dispatch'
    from /Users/ranmocy/.rvm/gems/ruby-1.9.3-p0-perf/gems/bundler-1.1.rc.7/lib/bundler/vendor/thor/base.rb:386:in `start'
    from /Users/ranmocy/.rvm/gems/ruby-1.9.3-p0-perf/gems/bundler-1.1.rc.7/bin/bundle:13:in `<top (required)>'
    from /Users/ranmocy/.rvm/gems/ruby-1.9.3-p0-perf/bin/bundle:19:in `load'
    from /Users/ranmocy/.rvm/gems/ruby-1.9.3-p0-perf/bin/bundle:19:in `<main>'

发现问题了,需要处理 capybara-webkit 的依赖,安装 qt 包后解决。

需要 登录 后方可回复, 如果你还没有账号请 注册新账号