Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Rails 3 Cucumber Load Error

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?

like image 899
spllr Avatar asked Aug 24 '10 11:08

spllr


1 Answers

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'
  ...
like image 79
dwayne Avatar answered Oct 02 '22 12:10

dwayne