読者です 読者をやめる 読者になる 読者になる

よかろうもん!

アプリからインフラまで幅広くこなすいまどきのクラウドエンジニアが記す技術ブログ

capybara-webkit のbundleに失敗したら。

Rails

以下のようにcapybara-webkit のbundle時に失敗したときの対応メモ。


Installing capybara-webkit (0.8.0) with native extensions /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems/installer.rb:482:in `build_extensions': ERROR: Failed to build gem native extension. (Gem::Installer::ExtensionBuildError)

/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby extconf.rb


Gem files will remain installed in /Users/interu/.rvm/gems/ruby-1.8.7-p352@rails3/gems/capybara-webkit-0.8.0 for inspection.
Results logged to /Users/interu/.rvm/gems/ruby-1.8.7-p352@rails3/gems/capybara-webkit-0.8.0/gem_make.out
from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems/installer.rb:445:in `each'
from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems/installer.rb:445:in `build_extensions'
from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems/installer.rb:197:in `install'
from /Users/interu/.rvm/gems/ruby-1.8.7-p352@global/gems/bundler-1.0.18/lib/bundler/source.rb:101:in `install'
from /Users/interu/.rvm/gems/ruby-1.8.7-p352@global/gems/bundler-1.0.18/lib/bundler/rubygems_integration.rb:78:in `preserve_paths'
from /Users/interu/.rvm/gems/ruby-1.8.7-p352@global/gems/bundler-1.0.18/lib/bundler/source.rb:91:in `install'
from /Users/interu/.rvm/gems/ruby-1.8.7-p352@global/gems/bundler-1.0.18/lib/bundler/installer.rb:58:in `run'
from /Users/interu/.rvm/gems/ruby-1.8.7-p352@global/gems/bundler-1.0.18/lib/bundler/rubygems_integration.rb:93:in `with_build_args'
from /Users/interu/.rvm/gems/ruby-1.8.7-p352@global/gems/bundler-1.0.18/lib/bundler/installer.rb:57:in `run'
from /Users/interu/.rvm/gems/ruby-1.8.7-p352@global/gems/bundler-1.0.18/lib/bundler/installer.rb:49:in `run'
from /Users/interu/.rvm/gems/ruby-1.8.7-p352@global/gems/bundler-1.0.18/lib/bundler/installer.rb:8:in `install'
from /Users/interu/.rvm/gems/ruby-1.8.7-p352@global/gems/bundler-1.0.18/lib/bundler/cli.rb:220:in `install'
from /Users/interu/.rvm/gems/ruby-1.8.7-p352@global/gems/bundler-1.0.18/lib/bundler/vendor/thor/task.rb:22:in `send'
from /Users/interu/.rvm/gems/ruby-1.8.7-p352@global/gems/bundler-1.0.18/lib/bundler/vendor/thor/task.rb:22:in `run'
from /Users/interu/.rvm/gems/ruby-1.8.7-p352@global/gems/bundler-1.0.18/lib/bundler/vendor/thor/invocation.rb:118:in `invoke_task'
from /Users/interu/.rvm/gems/ruby-1.8.7-p352@global/gems/bundler-1.0.18/lib/bundler/vendor/thor.rb:263:in `dispatch'
from /Users/interu/.rvm/gems/ruby-1.8.7-p352@global/gems/bundler-1.0.18/lib/bundler/vendor/thor/base.rb:386:in `start'
from /Users/interu/.rvm/gems/ruby-1.8.7-p352@global/gems/bundler-1.0.18/bin/bundle:13
from /Users/interu/.rvm/gems/ruby-1.8.7-p352@global/bin/bundle:19:in `load'
from /Users/interu/.rvm/gems/ruby-1.8.7-p352@global/bin/bundle:19

こんなエラーが出たら、Mac OS X Lionなら

$ brew update
$ brew install qt
$ bundle

他のプラットフォームの場合は、以下を参照して適切なパッケージをインストールする必要がある。
https://github.com/thoughtbot/capybara-webkit/wiki/Installing-QT