2

I want to initialize culerity with capybara in ruby 1.9 i followed https://rvm.beginrescueend.com/integration/culerity/ for jruby integration of culerity and added below line to my features/support/env.rb file

Culerity.jruby_invocation = File.expand_path("~/.rvm/bin/celerity_jruby")

added follwing lines to my Gemfile,

gem 'culerity'
gem 'celerity', :require => false

wheni run my cucumber test case, i got this error

 no driver called :culerity was found, available drivers: :rack_test, :selenium (Capybara::DriverNotFoundError)
Jai Keerthi
  • 5,395
  • 2
  • 16
  • 9

2 Answers2

1

I got this to work after a some trouble, it would seem that culerity works with ruby 1.9 despite capybara's notes still saying otherwise. However, culerity support has been separated into another gem "capybara-culerity".

There were rumours support would be dropped from capybara back in Feb (source google groups), I guess this solution allows a third-party(s) to keep the support alive. ryansch's solution is basically correct, however, there are a few additional requirements to get things working.

I have outlined the steps below, assuming that the steps in the RVM tutorial have been implmented correctly (https://rvm.beginrescueend.com/integration/culerity/ ), that is, gemsets, symbolic links, rvm, rvm wrapper, JRuby and Bash environment etc

Steps

Install the capybara-culerity gem

For celerity's Jruby environment ... (make sure celerity_jruby points to jruby, I pointed to the symbolic link under jruby@celerity)

>> celerity_jruby -S gem install capybara-culerity

For your projects main ruby environment add following to the gemfile and bundle install

Gemfile

... cucumber etc  ...
gem 'capybara' 
gem 'capybara-culerity'
gem 'culerity' 
gem 'celerity', :require => nil # jruby only

...

>>bundle install

add the following to your features/support/env.rb

require 'capybara/culerity'

...

Capybara.register_driver :culerity do |app|
  Capybara::Driver::Culerity.new(app)
end

...

Culerity.jruby_invocation = File.expand_path("~/.rvm/bin/celerity_jruby")

then in features/support/capybara.rb ... I suppose it could go in the env.rb instead

Capybara.javascript_driver = :culerity  # celerity through culerity for JS 
Capybara.default_driver = :rake-text # non-JS eg rake-test

I hope this helps others.

Andrew (@andicrook)

0

Add capybara-culerity to your Gemfile and try adding:

Capybara.register_driver :culerity do |app|
  Capybara::Driver::Culerity.new(app)
end

to your features/support/env.rb file before the call to

Capybara.javascript_driver = :culerity
ryansch
  • 79
  • 1
  • 10