環境
- MacOS Mojave (10.14.1)
- Xcode 10.1
- capybara-webkit 1.15.0
対応
- https://github.com/thoughtbot/capybara-webkit/issues/1072#issuecomment-430311949 に従う
- If you have added QT via brew trying to get this to work, clean up first:$ brew uninstall --force qt
- Download https://download.qt.io/archive/qt/5.5/5.5.0/qt-opensource-mac-x64-clang-5.5.0.dmg
- Run the installer
- Add the local install of qmake to your path, e.g. add this to
~/.bash_profile
:export PATH="/Users/username/Qt5.5.0/5.5/clang_64/bin/:$PATH"
- Restart your terminal to get the new path. Verify with
which cmake
- Accept the clickwrap
$ sudo xcodebuild -license
$ bundle upgrade capybara-webkit
- capybara-webkit 1.15.1 に upgrade する
-
New for 1.15.1:
-
Fix build for macOS 10.13/Xcode 10
- https://github.com/thoughtbot/capybara-webkit/blob/master/NEWS.md
-
補足情報
対応1の前に出てたエラー
Installing capybara-webkit 1.15.0 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
{ 中略 }
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
{ 中略 }
Command 'qmake ' failed
extconf failed, exit code 1
対応2の前に出てたエラー
Installing capybara-webkit 1.15.0 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
{ 中略 }
/Users/nomnel/Qt5.5.0/5.5/clang_64/lib/QtCore.framework/Headers/qglobal.h:39:12: fatal error: 'cstddef' file not found
# include <cstddef>
^~~~~~~~~
1 warning and 1 error generated.
make[1]: *** [build/webkit_server/c++.pch] Error 1
make: *** [sub-src-webkit_server-pro-make_first-ordered] Error 2
make failed, exit code 2