views:

47

answers:

1

I mostly followed these instructions to get things spun up: http://lindsaar.net/2010/5/9/Getting-Rails-3-Edge-with-jQuery-RSpec-and-Cucumber-using-RVM

If I create a completely blank .feature file, running cucumber results in this error:

cucumber

wrong number of arguments (3 for 1) (ArgumentError) /gems/gherkin-2.0.2/lib/gherkin/parser/parser.rb:125:in scan' /gems/gherkin-2.0.2/lib/gherkin/parser/parser.rb:125:in transition_table' /gems/gherkin-2.0.2/lib/gherkin/parser/parser.rb:112:in build_transition_map' /gems/gherkin-2.0.2/lib/gherkin/parser/parser.rb:108:in transition_map' /gems/gherkin-2.0.2/lib/gherkin/parser/parser.rb:75:in initialize' /gems/gherkin-2.0.2/lib/gherkin/parser/parser.rb:52:innew' /gems/gherkin-2.0.2/lib/gherkin/parser/parser.rb:52:in push_machine' /gems/gherkin-2.0.2/lib/gherkin/parser/parser.rb:20:ininitialize' /gems/cucumber-0.8.3/bin/../lib/cucumber/feature_file.rb:32:in new' /gems/cucumber-0.8.3/bin/../lib/cucumber/feature_file.rb:32:in parse' /gems/cucumber-0.8.3/bin/../lib/cucumber/step_mother.rb:62:in load_plain_text_features' /gems/cucumber-0.8.3/bin/../lib/cucumber/step_mother.rb:60:in each' /gems/cucumber-0.8.3/bin/../lib/cucumber/step_mother.rb:60:in load_plain_text_features' /gems/cucumber-0.8.3/bin/../lib/cucumber/cli/main.rb:55:in execute!' /gems/cucumber-0.8.3/bin/../lib/cucumber/cli/main.rb:25:in execute' /gems/cucumber-0.8.3/bin/cucumber:8 /bin/cucumber:19:inload' /bin/cucumber:19

Interestingly, if I comment out the features/support/env.rb file, I do not get the error. That doesn't do me much good though. I can run the site successfully (It's empty). Can anyone think of why the env code would kill the gherkin parser? I'm a little too new at this to know where to look next.

Thanks. -Jeff

A: 

Has this one answered for me. It's an incompatibility between the latest cucumber and gherkin. Needed to alter my gemfile to:

gem "cucumber" gem "gherkin", "= 2.1.4" gem "cucumber-rails"

Jeff D