简体   繁体   English

优胜美地的Capybara-webkit和Qt5

[英]Capybara-webkit and Qt5 on Yosemite

Latest Capybara-webkit throws a deprecation warning: 最新的Capybara-webkit抛出弃用警告:

WARNING: The next major version of capybara-webkit will require at least version 5.0 of Qt. You're using version 4.8.7.

So I: 所以我:

gem uninstall capybara-webkit
brew uninstall qt
brew install qt5
gem install capybara-webkit

That deprecation is now gone but all hell broke loose: 这种贬值现在已经消失,但一切都崩溃了:

$ rspec -p -- spec/features

Randomized with seed 52457
...2015-07-30 16:56:21.731 webkit_server[8416:6381638] Error loading /Library/Internet Plug-Ins/QuickTime Plugin.plugin/Contents/MacOS/QuickTime Plugin:  dlopen(/Library/Internet Plug-Ins/QuickTime Plugin.plugin/Contents/MacOS/QuickTime Plugin, 265): no suitable image found.  Did find:
    /Library/Internet Plug-Ins/QuickTime Plugin.plugin/Contents/MacOS/QuickTime Plugin: mach-o, but wrong architecture
plugin,NP_Initialize start
plugin,NP_Initialize end
plugin,NP_GetEntryPoints start
Private_Initialize
plugin,NP_GetEntryPoints end
2015-07-30 16:56:21.768 webkit_server[8416:6381638] Error loading /Users/meltemi/Library/Internet Plug-Ins/Google Earth Web Plug-in.plugin/Contents/MacOS/libnpgeplugin.dylib:  dlopen(/Users/meltemi/Library/Internet Plug-Ins/Google Earth Web Plug-in.plugin/Contents/MacOS/libnpgeplugin.dylib, 265): no suitable image found.  Did find:
    /Users/meltemi/Library/Internet Plug-Ins/Google Earth Web Plug-in.plugin/Contents/MacOS/libnpgeplugin.dylib: mach-o, but wrong architecture
[16:56:22.960] figHttpRequestDidReceiveResponseCallback signalled err=-12938 (kFigHTTPError_FileNotFound) (404 file not found) at /SourceCache/CoreMedia/CoreMedia-1562.235/Prototypes/FigHTTP/FigHTTPRequestCFURLConnection.c line 2037
[16:56:22.960] HTTPRequest figHttpRequestDidReceiveResponseCallback: received http response 404 (error -12938) for https://s3-us-west-2.amazonaws.com/myapp-test/assets/abc-audio.mp3
[16:56:22.960] HTTPRequest figHTTPDumpFinalURLAndRemoteAddress: address 123.231.123.21 final url https://s3-us-west-2.amazonaws.com/myapp-test/assets/abc-audio.mp3
[16:56:23.061] FigDCP_GetCacheFileVersion signalled err=-12540 (kFigDiskCacheProviderError_InvalidCacheFile) (unsupported file version) at /SourceCache/CoreMedia/CoreMedia-1562.235/Prototypes/FigByteStreamPrototypes/FigLimitedDiskCacheProvider.c line 366
[16:56:23.218] figHttpRequestDidReceiveResponseCallback signalled err=-12938 (kFigHTTPError_FileNotFound) (404 file not found) at /SourceCache/CoreMedia/CoreMedia-1562.235/Prototypes/FigHTTP/FigHTTPRequestCFURLConnection.c line 2037
[16:56:23.218] HTTPRequest figHttpRequestDidReceiveResponseCallback: received http response 404 (error -12938) for https://s3-us-west-2.amazonaws.com/myapp-test/assets/abc-audio.mp3
[16:56:23.218] HTTPRequest figHTTPDumpFinalURLAndRemoteAddress: address 123.231.123.21 final url https://s3-us-west-2.amazonaws.com/myapp-test/assets/abc-audio.mp3
F[16:56:27.056] figHttpRequestDidReceiveResponseCallback signalled err=-12938 (kFigHTTPError_FileNotFound) (404 file not found) at /SourceCache/CoreMedia/CoreMedia-1562.235/Prototypes/FigHTTP/FigHTTPRequestCFURLConnection.c line 2037
[16:56:27.056] HTTPRequest figHttpRequestDidReceiveResponseCallback: received http response 404 (error -12938) for https://s3-us-west-2.amazonaws.com/myapp-test/assets/abc-audio.mp4
[16:56:27.056] HTTPRequest figHTTPDumpFinalURLAndRemoteAddress: address 123.231.123.21 final url https://s3-us-west-2.amazonaws.com/myapp-test/assets/abc-audio.mp4
[16:56:27.209] figHttpRequestDidReceiveResponseCallback signalled err=-12938 (kFigHTTPError_FileNotFound) (404 file not found) at /SourceCache/CoreMedia/CoreMedia-1562.235/Prototypes/FigHTTP/FigHTTPRequestCFURLConnection.c line 2037
[16:56:27.209] HTTPRequest figHttpRequestDidReceiveResponseCallback: received http response 404 (error -12938) for https://s3-us-west-2.amazonaws.com/myapp-test/assets/abc-audio.webm
[16:56:27.209] HTTPRequest figHTTPDumpFinalURLAndRemoteAddress: address 123.231.123.21 final url https://s3-us-west-2.amazonaws.com/myapp-test/assets/abc-audio.webm
F.............[DEPRECATION] Capybara::Webkit::Driver#browser is deprecated.
.[DEPRECATION] Capybara::Webkit::Driver#browser is deprecated.

tried re-installing qt but there were linking conflicts with Qt5's qmake so I removed it. 尝试重新安装qt但是与Qt5的qmake存在链接冲突所以我删除了它。

Anyone have any ideas?!? 有人有想法么?!? Or should I just go back to plain old Qt4 and deal with deprecation warnings? 或者我应该回到普通的旧Qt4并处理弃用警告?

@pthamm pretty much nailed it. @pthamm几乎把它钉了起来。 Here's the same thing, but with a couple of the surrounding steps. 这是同样的事情,但有几个周围的步骤。

brew uninstall qt
brew install qt5
brew link --force qt5

Now running 现在正在运行

which qmake

Should return /usr/local/bin/qmake 应该返回/usr/local/bin/qmake

At this point I can rebuild the gem against the new qt5. 此时我可以针对新的qt5重建宝石。

gem pristine capybara-webkit

And then I was good to go again, tests are green. 然后我很高兴再去,测试是绿色的。 Yay! 好极了!

Did you run these commands: 你运行这些命令了吗:

brew linkapps qt5
brew link --force qt5

Homebrew's qt5 is keg-only so you need to create the symlinks manually. Homebrew的qt5只是keg-only,所以你需要手动创建符号链接。

check out the installation instructions for Yosemite here: https://github.com/thoughtbot/capybara-webkit/wiki/Installing-Qt-and-compiling-capybara-webkit 在这里查看Yosemite的安装说明: https//github.com/thoughtbot/capybara-webkit/wiki/Installing-Qt-and-compiling-capybara-webkit

and the top answer here: Can I use homebrew's qt5 with capybara-webkit? 最重要的答案是: 我可以使用homebrew的qt5和capybara-webkit吗?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM