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)