Capybara-webkitがインストールできない

環境


事象

エラーログ

Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

    /usr/local/var/rbenv/versions/2.2.3/bin/ruby -r ./siteconf20151117-6663-1lh78uk.rb extconf.rb
/Users/okamoto/vendor/bundle/ruby/2.2.0/gems/capybara-webkit-1.7.1/lib/capybara_webkit_builder.rb:31: warning: Insecure world writable dir /usr/local in PATH, mode 040777

Gem files will remain installed in /Users/okamoto/vendor/bundle/ruby/2.2.0/gems/capybara-webkit-1.7.1 for inspection.
Results logged to /Users/okamoto/vendor/bundle/ruby/2.2.0/extensions/x86_64-darwin-15/2.2.0-static/capybara-webkit-1.7.1/gem_make.out
An error occurred while installing capybara-webkit (1.7.1), and Bundler cannot continue.
Make sure that `gem install capybara-webkit -v '1.7.1'` succeeds before bundling.

ログファイル /Users/okamoto/vendor/bundle/ruby/2.2.0/extensions/x86_64-darwin-15/2.2.0-static/capybara-webkit-1.7.1/gem_make.out 内の記述

*** 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.

Command 'qmake ' not available

qmakeがないため、webkitがインストールできないようだ。

Homebrewからqt4をインストールし、再度実行する。

% brew update
% brew install qt4

% bundle install
Installing capybara-webkit 1.7.1 with native extensions
Bundle complete! 15 Gemfile dependencies, 69 gems now installed.
Bundled gems are installed into ./vendor/bundle.


結果

解決。


参考サイト

http://tagamidaiki.com/capybara-webkit-qmake/