Error installing gem capybara-webkit
Try installing libqt via homebrew.
$ brew install qt@5.5
ERROR: Error installing capybara-webkit:
If you are in Ubuntu do
sudo apt-get install qt4-dev-tools libqt4-dev libqt4-core libqt4-gui
If you are on Mac
brew install qt
and then
gem install capybara-webkit -v '0.11.0'
Installing capybara-webkit for Ruby on Rails
Here is quick fix that I implemented to solve my problem:
Step 1 : Head over to https://github.com/thoughtbot/capybara-webkit
Step 2 : Download a zip or clone the repo to your local from the master branch.
Step 3 : Open your Gemfile and update the gem configs as follows
gem "capybara-webkit", path: 'Path-To-The-Plugin-In-Your-Local-Machine\capybara-webkit-master'
Step 4 : Try running the bundle install and see if works. That's it.
error installing capybara-webkit. Can not compile
It looks like you're using gcc, which has trouble compiling some of Apple's newer frameworks.
If your CC
or CXX
environment variables are set, make sure they're set to cc
and c++
and not something like gcc
and g++
.
Unable to install capybara-webkit
I had to install QT link as capybara-webkit gem uses it to compile and install.
Not able to install capybara-webkit using bundle install command in Rails 4
Installation instructions are in the capybara-webkit wiki - https://github.com/thoughtbot/capybara-webkit/wiki/Installing-Qt-and-compiling-capybara-webkit . You'll want to install Qt 5.5.1 (5.6 is only supported if you build the QtWebKit module separately)
Error while building native extensions for capybara-webkit
I found a solution here :
https://bugreports.qt-project.org/browse/QTBUG-27237
Following this specific workaround make it work on my computer.
It seems to be a bug specific to version 4.8.3, where rcc.exe path is not found correctly.
Also, you might encounter the same error as me after this:
It turns out qmake compiled the webkit server into \capybara-webkit-0.12.1\src\release.
And capybara-webkit builder expect to get this exe from the "debug" folder, see line 57 of capybara_webkit_builder.rb
I forked the git repository and change this source file to rely on "release" folder instead and it works!
Still, it took me 2 pretty bad workarounds to make it work... Maybe the installation is more straightforward using QT 4.7.X as recommended into the capybara-webkit installation procedure.
I should test it.
Related Topics
How to Set Ruby's Load Path Externally
Rails If Object.Nil? Then Magic '' in Views
Are There Any Ipython-Like Shells for Ruby or Rails
Engine's Assets with Rails 3.1
Rake Aborted, Error While Trying to Load the Gem 'Uglifier'
Rails Model Has_Many , Belongs_To Relations
Find Most Common String in an Array
How to Get Parent Node in Capybara
Rails 4 Before_Action, Pass Parameters to Invoked Method
Is It Idiomatic Ruby to Add an Assert( ) Method to Ruby's Kernel Class
How to Create a Ruby Date Object from a String
Concatenating String with Number in Ruby