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
and then
-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.
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
For fedora
I am using Yosemite and following commands has fixed my issue.
For OSX, I had to
and then
without sudo it would error
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