Reputation: 6261
I am new to ruby, but while trying to install capybara to run test on my system I get the following error. Im running OSX
my_app$ gem install capybara-webkit
Building native extensions. This could take a while...
ERROR: Error installing capybara-webkit:
ERROR: Failed to build gem native extension.
/Users/joe/.rvm/rubies/ruby-1.9.2-p290/bin/ruby extconf.rb
Gem files will remain installed in /Users/joe/.rvm/gems/ruby-1.9.2-p290/gems/capybara-webkit-0.7.2 for inspection.
Results logged to /Users/joe/.rvm/gems/ruby-1.9.2-p290/gems/capybara-webkit-0.7.2/./gem_make.out
here are results from gem_make.out
/Users/joe/.rvm/rubies/ruby-1.9.2-p290/bin/ruby extconf.rb
Upvotes: 83
Views: 44666
Reputation: 647
For Debian & Ubuntu
sudo apt-get update
sudo apt-get install g++ qt5-default libqt5webkit5-dev gstreamer1.0-plugins-base gstreamer1.0-tools gstreamer1.0-x
You can find other ways to install Qt here
Upvotes: 3
Reputation: 21795
brew install [email protected]
and then
gem install capybara-webkit -v '0.7.2'
-v 0.7.2 is to select version project is asking you to install. See that installing qt from http://developer.qt.nokia.com/wiki/Support_for_Mac_OS_X requires to set PATH variable.
Upvotes: 22
Reputation: 33954
Try installing libqt via homebrew.
$ brew install [email protected]
Upvotes: 96
Reputation: 487
Install with either homebrew or macports Homebrew
Qt 5.5 is the last version of Qt that capybara-webkit will support. The Qt project has dropped the WebKit bindings from binary releases in 5.6.
Install Qt 5.5 with homebrew:
brew install [email protected]
The Homebrew formula for qt55 is keg only which means binaries like qmake will not be symlinked into your /usr/local/bin directory and therefore will not be available for capybara-webkit.
To force Homebrew to symlink those binaries into your /usr/local/bin directory you can run:
brew link --force qt55
After running this command you should get the following output:
$ which qmake
/usr/local/bin/qmake
Macports
Install qt5 with macports:
sudo port install qt5 qt5-qtwebkit # It's not qt5-mac anymore.
The default location for qt5's qmake is /opt/local/libexec/qt5/bin/qmake. If the qmake on path is different, you can indicate the correct one with QMAKE environment variable.
QMAKE=/opt/local/libexec/qt5/bin/qmake gem install capybara-webkit
Upvotes: 5
Reputation: 1168
I've got error in my mac OS X 10.12, and this fixed the problem.
brew install qt5
brew link --force qt5
gem install capybara-webkit
Upvotes: 0
Reputation: 3669
Solution for Linux.
Ubuntu
sudo apt-get install libqt4-dev libqtwebkit-dev
Debian Stable
sudo apt-get install libqt4-dev
Fedora
yum install qt-webkit-devel
Fedora 16
yum install qtwebkit-devel
This works for me maybe it will be also helpful for somebody.
Upvotes: 92
Reputation: 139
I was able to get qt and capybara-webkit installed and working on OS X. I had to install Xcode so the build for
gem install capybara-webkit
would finish.
I also set this in my environment
Capybara.javascript_driver = :webkit
brew install qt5
to get latest qt.
The docs for it say that it conflicts with qt4, so be sure to remove that first with
brew uninstall [old qt]
Then it needs to be symlinked with
brew link --force qt5
Upvotes: 0
Reputation: 59
For fedora
yum install qt-webkit-devel
export QMAKE=/usr/bin/qmake-qt4
gem install capybara-webkit
Upvotes: 1
Reputation: 7067
Here are the complete steps to install Capybara-webkit
in all the OS
Install QT - http://qt-project.org/downloads
brew update
brew install qt
ln -s /usr/local/Cellar/qt5/5.4.1/bin/qmake /usr/local/bin/qmake
sudo port install qt4-mac-devel
Reference: Capybara Installation
Upvotes: 1
Reputation: 1377
I am using Yosemite and following commands has fixed my issue.
brew install qt
brew linkapps qt
gem install capybara-webkit
Upvotes: 1
Reputation: 3403
QT was the answer for me, thougtbot provide a comprehensive installation options here:
https://github.com/thoughtbot/capybara-webkit/wiki/Installing-Qt-and-compiling-capybara-webkit
Generally depending on where you have home brew, this worked for me:
brew update
brew install qt
gem install capybara-webkit
Upvotes: 2
Reputation: 31
On OSX Mavericks 10.9, qt5 does not install qmake. This post was the only thing that worked for me.
Step 1: Download Qt 5.2.0-beta-1-clang HERE.
Step 2: Install it and include the Src files.
Step 3: Symlink qmake into your /bin directory from the location where you installed Qt. The default location is in your home directory. Open a shell and do something like:
ln -s /Path/to/where/you/installed/Qt5.2/5.2.0-beta1/clang_64/bin/qmake /usr/local/bin/qmake
Then gem install capybara-webkit.
Upvotes: 1
Reputation: 7220
For OSX, I had to
brew install qt
and then
sudo gem install capybara-webkit -v '0.7.2'
without sudo it would error
Upvotes: 6
Reputation: 101
Was having exactly this problem trying to install capybara-webdriver on CentOS 6 after installing QT.
Fixed the problem by adding the following to my PATH environment variable
/usr/lib64/qt4/bin/
Upvotes: 10