LoginSignup
2
1

More than 3 years have passed since last update.

capybara-webkitがbundle install出来ない時の対処法

Last updated at Posted at 2019-07-17

はじめに

会社でcapybara-webkitを使っているのですが、環境構築の際ほとんどの人がcapybara-webkitのインストールで詰まっていたので再現性のある対処法を書きました

対処

もし既にバトっていてqtをbrewインストールしてしまっていたなら、qtを削除してください

$ brew uninstall --force qt

こちらの本家から直接dmgファイルをダウンロードして、インストールしてください。
https://download.qt.io/archive/qt/5.5/5.5.0/qt-opensource-mac-x64-clang-5.5.0.dmg

qmakeのpathをbash(またはzsh)に追加してください。 e.g. ~/.bash_profile

export PATH="/Users/username/Qt5.5.0/5.5/clang_64/bin/:$PATH"

ターミナルを再起動またはsourceコマンドを実行した後、cmakeが存在するか確認してください。

$ wich cmake

Xcodeのバージョンが8.0以上の場合, qtフォルダ以下の設定ファイルを一部書き換える必要があります。

$ vi /Users/your-username/Qt5.5.0/5.5/clang_64/mkspecs/features/mac/default_pre.prf

isEmpty($$list($$system("/usr/bin/xcrun -find xcrun 2>/dev/null")))

isEmpty($$list($$system("/usr/bin/xcrun -find xcodebuild 2>/dev/null")))
に置き換えてください。

$ sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer

を実行した後

$ sudo xcodebuild -license

を実行し、ライセンスの長い説明文が出てくるので、一番下に来るまでspaceを押して、最後にagreeと入力してください。

最後に

$ bundle install

して終わりです。

参考文献

https://github.com/thoughtbot/capybara-webkit/issues/1072
https://stackoverflow.com/questions/33728905/qt-creator-project-error-xcode-not-set-up-properly-ou-may-need-to-confirm-t

2
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
1