Search code examples
rspeccapybara-webkit

Uninitialized constant Capybara::Webkit::Configuration


I have an issue due adding the puffing-billy to my capybara-webkit features. I followed by instructions:

rails_helper.rb:

require 'billy/capybara/rspec'

capybara.rb:

Capybara.javascript_driver = :webkit_billy
#and other staff bellow

Due running feature I have:

NameError:
            uninitialized constant Capybara::Webkit::Configuration
          # /Users/ir/.rvm/gems/ruby-2.5.0@guestready/gems/puffing-billy-0.11.1/lib/billy/browsers/capybara.rb:43:in `block in register_webkit_driver'
          # /Users/ir/.rvm/gems/ruby-2.5.0@guestready/gems/capybara-2.17.0/lib/capybara/session.rb:101:in `driver'

What I m missing?


Solution

  • This is most likely because you're using a very old version of capybara-webkit. If you don't need the latest Capybara lock the version of capybara-webkit in your Gemfile to ~>1.14 (latest release) If you do need the latest Capybara you'll have to tell your Gemfile to use the master branch of capybara-webkit.