2015-10-14 58 views
2

当我运行rspec的,我得到以下信息:弃用警告的水豚,WebKit的需要的Qt版本5

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

我不知道我是使用Qt,所以什么都不知道升级的含义它。

我该如何升级它,以及在做之前应该采取哪些预防措施?上述

+0

您正在使用的库可能会使用Qt。我不认为安装Qt可以提供帮助。尝试用5.0版替换现有的4.8.6库。 – Aman

+0

你如何用5.0代替现有的4.8.6库? – Obromios

+0

关于在https://github.com/thoughtbot/capybara-webkit/wiki/Installing-Qt-and-compiling-capybara-webkit安装qt有很多信息,但是看不到有关如何升级的任何信息。 – Obromios

回答

4

equaleffect的评论使我ImNaN answer,即

Comment out the capybara and capybara-webkit gems from your gemfile. Then: 

    bundle 
    gem uninstall capybara-webkit 
    gem uninstall capybara # if it complains about dependencies 'gem uninstall' them first 
    brew remove qt 
    brew remove qt5 # if you've been playing around 

From a clean environment (restart your terminal): 

    brew install qt5 
    brew linkapps qt5 
    brew link --force qt5 

Uncomment capybara and capybara-webkit in the gemfile and then: 

    bundle install 
+0

由于我有一个没有安装brew的Ubuntu系统,我使用了这个替代解决方案,它似乎很好地工作:'sudo apt-get install qt5-default libqt5webkit5-dev gstreamer1.0-plugins-base gstreamer1.0-tools gstreamer1。 0-x“(根据[thoughtbot/capybara-webkit]上的指示(https://github.com/thoughtbot/capybara-webkit/wiki/Installing-Qt-and-compiling-capybara-webkit#debian--ubuntu) )之后是“宝石原始水豚-webkit”。 – Franco