Question

I can install capybara-webkit on Mac, when I deployed code on Ubuntu, I am facing below error

    Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.

            /usr/local/bin/ruby extconf.rb 


    Gem files will remain installed in /home/datas/.bundler/tmp/7940/gems/capybara-webkit-0.12.1 for inspection.
    Results logged to /home/datas/.bundler/tmp/7940/gems/capybara-webkit-0.12.1/./gem_make.out

   An error occured while installing capybara-webkit (0.12.1), and Bundler cannot continue.
   Make sure that `gem install capybara-webkit -v '0.12.1'` succeeds before bundling.

Even I tried with sudo gem install capybara-webkit -v '0.12.1'

I am getting same error.

Was it helpful?

Solution

Install libqt4-dev and it will fix your problem

sudo apt-get install libqt4-dev

read this one for more information.

Please let me know if you have still problem on this

OTHER TIPS

capybara-webkit depends on a WebKit implementation from Qt, a cross-platform development toolkit. You'll need to download the Qt libraries to build and install the gem. capybara-webkit 0.12.x depends on Qt >= 4.6 and capybara-webkit 0.13+ depends on Qt >= 4.7. You can check your version of Qt by running qmake -v.

If you get an error when building, along the lines of fatal error: QObject: No such file or directory, you might be attempting the build against Qt3. Either uninstall Qt3, or make sure that the qmake in your PATH links to Qt4. ...more

For those getting this error on Mac, try this:

brew update

brew install qt

bundle
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top