bundle installでこける
私的にnokogiriとcapybaraはこける鉄板。
qt@5.5は確実にあるはずなんだけどなあと思ったらXcodeのせいだった。
Xcodeをversion10にあげるときに、AppStoreから落とすと時間がかかるので、
Applicationから古いversionを消してAppleのサイトから直で落としてきていたのも罠だった。
(Xcodeはコーディングに使っていません。)
エラー
前は qmake command not avairableみたいなエラーだったのに、今日はfailedだった。
Building native extensions. This could take a while...
ERROR: Error installing capybara-webkit:
ERROR: Failed to build gem native extension.
current directory: /Users/hoge/.rbenv/versions/2.4.6/lib/ruby/gems/2.4.0/gems/capybara-webkit-1.15.1
/Users/hoge/.rbenv/versions/2.4.6/bin/ruby -r ./siteconf20190531-390-jxbok3.rb extconf.rb
Project ERROR: Xcode not set up properly. You may need to confirm the license agreement by running /usr/bin/xcodebuild.
*** 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
--without-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/hoge/.rbenv/versions/2.4.6/bin/$(RUBY_BASE_NAME)
--with-gl-dir
--without-gl-dir
--with-gl-include
--without-gl-include=${gl-dir}/include
--with-gl-lib
--without-gl-lib=${gl-dir}/lib
--with-zlib-dir
--without-zlib-dir
--with-zlib-include
--without-zlib-include=${zlib-dir}/include
--with-zlib-lib
--without-zlib-lib=${zlib-dir}/lib
Command 'qmake ' failed
対処
公式サイトに載ってます。
https://github.com/thoughtbot/capybara-webkit/wiki/Installing-Qt-and-compiling-capybara-webkit#xcode-80
sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer
を試せとのことだったが、試したら
xcode-select: error: invalid developer directory '/Applications/Xcode.app/Contents/Developer'
とのこと。あれと思ったらApplicationsではなくDownloadsに入ってたので移動させて再実行からのbundle。