2015-10-14 49 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