Project ERROR: Unknown module(s) in QT: webkitwidgets

Problem

You are trying to bundle install a Gemfile that includes the capybara-webkit gem, in an Ubuntu system but you get the following error:

ERROR:  Error installing capybara-webkit:
ERROR: Failed to build gem native extension.
Project ERROR: Unknown module(s) in QT: webkitwidgets

Solution

It seems that the latest ubuntu versions are using QT version 5 instead of 4. So in order to be able to install the gem you would need to install the qt development libraries for version 5 like:

sudo apt-get install libqt5webkit5-dev