Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can't install Capybara-Webkit on Debian

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.

like image 559
jamesconant Avatar asked Jul 03 '13 03:07

jamesconant


2 Answers

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

  • sudo apt-get install qt4-qmake
  • sudo apt-get install libqtwebkit-dev
like image 196
proteantech Avatar answered Sep 20 '22 14:09

proteantech


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.

like image 36
jamesconant Avatar answered Sep 18 '22 14:09

jamesconant