I want to try cucumber but............

Here is my Gemfile:

gem "jruby-openssl"
gem "will_paginate", "~> 3.0.pre2"
gem "rubycas-client"
gem 'foreigner'
gem 'warbler'
group :test, :development do
  gem 'capybara'
  gem 'database_cleaner'
  gem 'cucumber-rails'
  gem 'cucumber'
  gem 'rspec-rails', '>=2.0.0.beta.22'
  gem 'spork'
  gem 'launchy'
end

When I run jruby script/rails generate cucumber:install --help I have
this error:

/home/user/jruby/lib/ruby/site_ruby/shared/ffi/library.rb:28:in
`ffi_lib': Could not open library 'xml2' : xml2: cannot open shared
object file: No such file or directory. Could not open library
'libxml2.so' : libxml2.so: cannot open shared object file: No such
file or directory (LoadError)

What I've missed?

When I run jruby script/rails generate cucumber:install --help I have

this error:

/home/user/jruby/lib/ruby/site_ruby/shared/ffi/library.rb:28:in

`ffi_lib’: Could not open library ‘xml2’ : xml2: cannot open shared

object file: No such file or directory. Could not open library

‘libxml2.so’ : libxml2.so: cannot open shared object file: No such

file or directory (LoadError)

You need to install libxml for your os distro, because Nokogiri depends on it and from what I see, Cucumber uses Nokogiri from what I have seen. I have installed this on both osx and Ubuntu Server, let me know if you have any trouble and I can try to dig up my notes.

I'm using debian.
I've to install libxml-ruby and nokogiri-ruby packages?
I'm using jruby.

When I run jruby script/rails generate cucumber:install --help I have

this error:

/home/user/jruby/lib/ruby/site_ruby/shared/ffi/library.rb:28:in

`ffi_lib’: Could not open library ‘xml2’ : xml2: cannot open shared

object file: No such file or directory. Could not open library

‘libxml2.so’ : libxml2.so: cannot open shared object file: No such

file or directory (LoadError)

You need to install libxml for your os distro, because Nokogiri depends on

it and from what I see, Cucumber uses Nokogiri from what I have seen. I have

installed this on both osx and Ubuntu Server, let me know if you have any

trouble and I can try to dig up my notes.

I’m using debian.

I’ve to install libxml-ruby and nokogiri-ruby packages?

I’m using jruby.

First, I know very little about jruby. But as far as getting cucumber working, I think that you should first just try installing libxml2 - I think you have to use your distro’s package manager or manually install. I would google for libxml2 and debian. Then see if you are getting the same error message.

I think this would solve the problem, because as far as I can see Cucumber installs Nokogiri along with it – at least I am using rvm and I did not have to install Nokogiri to get Cucumber working, so I am making that assumption. Also, someone can correct me if wrong, but I think libxml-ruby is something that sits on top of libxml/libxml2, so I think you have to install libxml first.

libxml2-dev, I have installed it and solved the problem.
Thank you very much.