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.

jamesconant
  • 1,405
  • 1
  • 12
  • 18

3 Answers3

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.

valadil
  • 1,648
  • 1
  • 14
  • 30
jamesconant
  • 1,405
  • 1
  • 12
  • 18
  • 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-dev – link0ff Sep 05 '13 at 16:08
  • In my case, the first option (installing `libqtwebkit-dev`) alone seemed to do the trick -- that pulled in all the other needed dependencies. – Chris W. Nov 28 '14 at 23:28
8

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

  • sudo apt-get install qt4-qmake
  • sudo apt-get install libqtwebkit-dev
proteantech
  • 421
  • 1
  • 4
  • 8
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
plombix
  • 396
  • 3
  • 13