Deepzter
Deepzter

Reputation: 57

Installing webkit for Capybara

I'm trying to install webkit for Capybara, using the information provided here, but I'm getting an error.

Following the instructions I have tried to change the qmake.conf file in the Qt installation directory but I couldn't find the QMAKE_IDC parameter and I don't know where the following values should be placed:

QMAKE_RCC = $$[QT_INSTALL_BINS]$${DIR_SEPARATOR}rcc$${EXE_SUFFIX}
QMAKE_LFLAGS = -static-libgcc -static-libstdc++

The following error is what I got:

C:\Users\Deepzster\Desktop\app\app>gem install capybara-webkit
Temporarily enhancing PATH to include DevKit...
    Building native extensions.  This could take a while...
        ERROR:  Error installing capybara-webkit:
        ERROR: Failed to build gem native extension.

C:/RailsInstaller/Ruby2.0.0/bin/ruby.exe -r ./siteconf20141118-9536-wfpmna.rb extconf.rb
    Command 'qmake -spec win32-g++ ' not available

Makefile not found

Upvotes: 1

Views: 763

Answers (3)

PinkSheep
PinkSheep

Reputation: 71

I had the same problem. I had installed the latest version of Qt, which is version 5.3. I looked up the instructions on https://github.com/thoughtbot/capybara-webkit/wiki/Installing-Qt-and-compiling-capybara-webkit, and one of the instructions is to modify the qmake.conf file, and the edits are to be made after "the line beginning with QMAKE_IDC". However, this line wasn't available in my qmake.conf file.

Therefore, I installed the version stated in the instructions, which is version 4.8.5. Here's the link - http://download.qt-project.org/archive/qt/4.8/4.8.5/. I downloaded qt-win-opensource-4.8.5-mingw.exe (I'm on a Windows 7 64-bit machine).

The qmake.conf file in this version does have the line beginning with QMAKE_IDC, so I could edit it as required. I then followed the rest of the instructions up to step 10 on the link (I also tried step 11, but I got a 'make failed' error). I then went to the directory containing my Gemfile and entered

gem install capybara-webkit

and the installation was successful.

Upvotes: 2

Achayan
Achayan

Reputation: 5895

Make sure your qmake is added in system path, otherwise it will fail to install.

Upvotes: 2

sashaegorov
sashaegorov

Reputation: 1862

There is no qmake utility on your workstation, as indicated by this message:

Command 'qmake -spec win32-g++ ' not available

I may suggest you to install QT for Windows. If this already done here suggested readings.

Upvotes: 0

Related Questions