-1

As I'm following railstutorial.org to learn cucumber, the test program keeps crashing.

When I type in: bundle exec cucumber features/ to run signing_in.feature, the command line complains that:

stack level too deep (SystemStackError) C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1.gems/cucumber-1.2.4/lib/cucumber/parser/gherkin_builder.rb:100

Below is copied from my gemfile:

source 'https://rubygems.org'

gem 'rails', '3.2.13'

gem "bootstrap-sass", "~> 2.3.1.0"
gem 'bcrypt-ruby', '~> 3.0.1'

group :development, :test do
  gem 'rspec-rails'
end

group :development do
  gem 'annotate', '~> 2.5.0'
end


group :assets do
  gem 'sass-rails',   '~> 3.2.3'
  gem 'coffee-rails', '~> 3.2.1'



  gem 'uglifier', '>= 1.0.3'
end

gem 'jquery-rails'


gem 'pg', '0.12.2'

group :test do
  gem 'capybara', '1.1.2'
  gem 'factory_girl_rails', '~> 4.1.0'
  gem 'cucumber-rails', '1. :require=>false
  gem 'database_cleaner', '0.7.0'
end
deefour
  • 34,974
  • 7
  • 97
  • 90
Chéng Yú
  • 51
  • 5

2 Answers2

0

I am new to cucumber and have recently experienced this problem myself. I solved this problem by editing gherkin_builder.rb (see the file path that you quoted). In my case ENV['CUCUMBER_FORWARD_SLASH_PATHS'] was empty. I needed forward slashes so I commented out everything in the file method except @path. If you are using backward slashes you will need @path.gsub(///, '\') in the previous line. I hope this helps! Francois

user2041343
  • 81
  • 1
  • 1
  • 6
0

I faced this problem as well. I reverted to Ruby 1.9.3 first which did not solve the problem. Then, I reverted to cucumber 1.2.3. It worked.