I have the Exception encountered: #<SystemExit: exit>
error, when trying run cucumber through spork.
features/support/env.rb:
require 'rubygems'
require 'spork'
require 'cucumber/rails'
require 'pickle/world'
require "capybara/poltergeist"
Spork.prefork do
Capybara.javascript_driver = :poltergeist
end
Spork.each_run do
ActionController::Base.allow_rescue = false
begin
DatabaseCleaner[:mongoid].strategy = :truncation
rescue NameError
raise "You need to add database_cleaner to your Gemfile (in the :test group) if you wish to use it."
end
DatabaseCleaner[:mongoid].clean
Cucumber::Rails::Database.javascript_strategy = :truncation
end
Run without spork:
vagrant@lucid32:/vagrant$ bundle exec cucumber
WARNING: No DRb server is running. Running features locally:
Rack::File headers parameter replaces cache_control after Rack 1.5.
Using the default profile...
Feature: Password recovery
In order to retrieve lost password
As a user of this site
I want to reset it
Scenario: Reset password # features/users/password_recovery.feature:6
Given I am not logged in # features/step_definitions/login_steps.rb:1
And a user exists # features/step_definitions/pickle_steps.rb:4
1 scenario (1 passed)
2 steps (2 passed)
0m0.504s
Run with spork:
vagrant@lucid32:/vagrant$ bundle exec cucumber
Disabling profiles...
Feature: Password recovery
In order to retrieve lost password
As a user of this site
I want to reset it
Scenario: Reset password # features/users/password_recovery.feature:6
Given I am not logged in # features/step_definitions/login_steps.rb:1
And a user exists # features/step_definitions/pickle_steps.rb:4
1 scenario (1 passed)
2 steps (2 passed)
0m0.495s
Exception encountered: #<SystemExit: exit>
backtrace:
/usr/local/rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/cucumber-1.3.1/lib/cucumber/cli/main.rb:54:in `exit'
/usr/local/rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/cucumber-1.3.1/lib/cucumber/cli/main.rb:54:in `rescue in execute!'
/usr/local/rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/cucumber-1.3.1/lib/cucumber/cli/main.rb:37:in `execute!'
/usr/local/rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/spork-0.9.2/lib/spork/test_framework/cucumber.rb:24:in `run_tests'
/usr/local/rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/spork-0.9.2/lib/spork/run_strategy/forking.rb:13:in `block in run'
/usr/local/rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/spork-0.9.2/lib/spork/forker.rb:21:in `block in initialize'
/usr/local/rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/spork-0.9.2/lib/spork/forker.rb:18:in `fork'
/usr/local/rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/spork-0.9.2/lib/spork/forker.rb:18:in `initialize'
/usr/local/rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/spork-0.9.2/lib/spork/run_strategy/forking.rb:9:in `new'
/usr/local/rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/spork-0.9.2/lib/spork/run_strategy/forking.rb:9:in `run'
/usr/local/rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/spork-0.9.2/lib/spork/server.rb:48:in `run'
/usr/local/rbenv/versions/1.9.3-p194/lib/ruby/1.9.1/drb/drb.rb:1548:in `perform_without_block'
/usr/local/rbenv/versions/1.9.3-p194/lib/ruby/1.9.1/drb/drb.rb:1508:in `perform'
/usr/local/rbenv/versions/1.9.3-p194/lib/ruby/1.9.1/drb/drb.rb:1586:in `block (2 levels) in main_loop'
/usr/local/rbenv/versions/1.9.3-p194/lib/ruby/1.9.1/drb/drb.rb:1582:in `loop'
/usr/local/rbenv/versions/1.9.3-p194/lib/ruby/1.9.1/drb/drb.rb:1582:in `block in main_loop'
How to solve it?
I also encountered this. Not sure why, but I guess this is because I'd updated cucumber-rails to the latest version. After I switched back to older version, the problem's gone
try putting these lines into your Gemfile
gem 'cucumber', '1.2.5'
gem 'cucumber-rails', '1.3.0', :require => false
then bundle install
I hope this helps
I submitted a pull request to spork to fix the issue.
https://github.com/sporkrb/spork/pull/228
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With