views:

178

answers:

1

I am trying to get cucumber to work with Rails 3.
But whenever I try to run the cucumber features I get an load error.

cucumber-0.7.3/lib/cucumber/ast/feature_element.rb:2:in `require': no such file to load -- gherkin/parser/tag_expression (LoadError)

I have added the following gems to the Gemfile

gem "rspec", '>= 2.0.0.beta.19'
gem 'capybara'
gem 'database_cleaner'
gem 'cucumber-rails', '~> 0.1.1.rc6'
gem 'cucumber', '~> 0.7.0.beta.8'
gem 'rspec-rails', '~> 2.0.0.beta.19'
gem 'spork'
gem 'launchy'

I'm running on ruby-1.9.2-p0

Any suggestions?

A: 

I was getting the same error and was able to move past it by forcing gherkin to be loaded in Gemfile instead of as a cucumber dependency.

So, assigning specific version to Gherkin and >= to cucumbers:

  ...
  gem 'gherkin', '2.1.5'
  gem 'cucumber-rails', '>=0.3.2'
  gem 'cucumber', '>=0.8.5'
  ...
dwayne