Can't install Capybara-Webkit on Debian
Asked Answered
H

3

5

I am currently trying to install Capybara-Webkit on a rails 3.2 app. Everytime I try to install the gem I get the following output. I am on Debian unstable.

ERROR:  Error installing capybara-webkit:
ERROR: Failed to build gem native extension.

    /home/james/.rvm/rubies/ruby-1.9.3-p392/bin/ruby extconf.rb
qmake: could not find a Qt installation of ''
Command 'qmake -spec linux-g++' failed


Gem files will remain installed in /home/james/.rvm/gems/ruby-1.9.3-p392@ho/gems/capybara-webkit-1.0.0 for inspection.
Results logged to /home/james/.rvm/gems/ruby-1.9.3-p392@ho/gems/capybara-webkit-1.0.0/./gem_make.out

I've installed libqtwebkit-dev via apt, as well as qtcreator. I still get these errors and I'm at my wits end.

Has anyone else come across this issue with debian? It's been a long day so i'm likely missing some information. Please let me know if there is any more info I can provide.

Haunch answered 3/7, 2013 at 3:20 Comment(2)
Do you have qmake installed?Christmas
So, I do sudo apt-get install qt4-qmake and it says that it is already installed. However, when I do which qmake nothing returns.Haunch
H
8

My initial guess was that the gem's build script couldn't properly locate my qmake for whatever reason and I think that might have had something to do with it as doing export QMAKE=/usr/bin/qmake-qt4 seemed to resolve the issue.

If you are a debian user and cannot get this gem to install, try giving these steps a shot. I've not tested out which ones are not required on a clean system but after doing all of them I was able to install the gem.

  1. sudo apt-get install libqtwebkit-dev qt4-dev-tools libqt4-dev libqt4-core libqt4-gui qmake-qt4

  2. export QMAKE=/usr/bin/qmake-qt4

  3. gem install capybara-webkit

That seems to have done the trick for me.

Haunch answered 3/7, 2013 at 14:26 Comment(2)
Thanks, tho has to install a couple of additional libraries too: qt4-qmake libqt5webkit5-dev qtquick1-5-dev qtlocation5-dev qtsensors5-dev qtdeclarative5-dev libxslt1-dev libgstreamer1.0-dev libgstreamer0.10-dev libgstreamer-plugins-base1.0-dev libgstreamer-plugins-base0.10-dev libgstreamer0.10-dev libgstreamer-plugins-base0.10-dev libsqlite3-devChristie
In my case, the first option (installing libqtwebkit-dev) alone seemed to do the trick -- that pulled in all the other needed dependencies.Botulin
R
8

The following worked for me on Ubuntu 12.04(LTS):

  • sudo apt-get install qt4-qmake
  • sudo apt-get install libqtwebkit-dev
Rend answered 9/9, 2013 at 18:31 Comment(1)
Works for Ubuntu 14.04 as well.Jumbuck
C
0

The qmake-qt4 package has been rename qt4-qmake ;) and is include by the others. So:

sudo apt-get install libqtwebkit-dev qt4-dev-tools libqt4-dev libqt4-core libqt4-gui
Cent answered 26/8, 2015 at 20:55 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.