I'm very confused by this error I'm getting. If Capybara is NOT missing the constant, why is it complaining???
Background
I am upgrading a Rails app and am now running on Rails 3.0.7 and Ruby 1.9.3. I upgraded to Cucumber 1.1.2 and after some picky work and running around in circles, all of my tests were running fine. I then tried to upgrade Rspec to get those tests running. Again, with some running around in circles I managed to get the Rspec tests running with 'rspec-rails' 3.2.0 and Capybara 2.2.0.
Yay me!
But then I went back to the Cucumber tests to check something, and...BAM. Cucumber tests are broken with a very strange error message...
Capybara is not missing constant RackTest! (ArgumentError)
/Users/camillavk/.rvm/gems/ruby-1.9.3-p551@rails3/gems/activesupport-3.0.7/lib/active_support/dependencies.rb:479:in `load_missing_constant'
/Users/camillavk/.rvm/gems/ruby-1.9.3-p551@rails3/gems/activesupport-3.0.7/lib/active_support/dependencies.rb:183:in `block in const_missing'
/Users/camillavk/.rvm/gems/ruby-1.9.3-p551@rails3/gems/activesupport-3.0.7/lib/active_support/dependencies.rb:181:in `each'
/Users/camillavk/.rvm/gems/ruby-1.9.3-p551@rails3/gems/activesupport-3.0.7/lib/active_support/dependencies.rb:181:in `const_missing'
/Users/camillavk/.rvm/gems/ruby-1.9.3-p551@rails3/gems/cucumber-rails-0.4.1/lib/cucumber/rails/capybara/javascript_emulation.rb:67:in `<top (required)>'
/Users/camillavk/.rvm/gems/ruby-1.9.3-p551@rails3/gems/activesupport-3.0.7/lib/active_support/dependencies.rb:239:in `require'
/Users/camillavk/.rvm/gems/ruby-1.9.3-p551@rails3/gems/activesupport-3.0.7/lib/active_support/dependencies.rb:239:in `block in require'
/Users/camillavk/.rvm/gems/ruby-1.9.3-p551@rails3/gems/activesupport-3.0.7/lib/active_support/dependencies.rb:227:in `load_dependency'
/Users/camillavk/.rvm/gems/ruby-1.9.3-p551@rails3/gems/activesupport-3.0.7/lib/active_support/dependencies.rb:239:in `require'
/Users/camillavk/.rvm/gems/ruby-1.9.3-p551@rails3/gems/cucumber-rails-0.4.1/lib/cucumber/rails/capybara.rb:5:in `<top (required)>'
/Users/camillavk/.rvm/gems/ruby-1.9.3-p551@rails3/gems/activesupport-3.0.7/lib/active_support/dependencies.rb:239:in `require'
/Users/camillavk/.rvm/gems/ruby-1.9.3-p551@rails3/gems/activesupport-3.0.7/lib/active_support/dependencies.rb:239:in `block in require'
/Users/camillavk/.rvm/gems/ruby-1.9.3-p551@rails3/gems/activesupport-3.0.7/lib/active_support/dependencies.rb:227:in `load_dependency'
/Users/camillavk/.rvm/gems/ruby-1.9.3-p551@rails3/gems/activesupport-3.0.7/lib/active_support/dependencies.rb:239:in `require'
/Users/camillavk/.rvm/gems/ruby-1.9.3-p551@rails3/gems/cucumber-rails-0.4.1/lib/cucumber/rails.rb:10:in `<top (required)>'
/Users/camillavk/Documents/Work/Saild/saild/features/support/env.rb:7:in `require'
/Users/camillavk/Documents/Work/Saild/saild/features/support/env.rb:7:in `<top (required)>'
/Users/camillavk/.rvm/gems/ruby-1.9.3-p551@rails3/gems/cucumber-1.1.2/lib/cucumber/rb_support/rb_language.rb:143:in `load'
/Users/camillavk/.rvm/gems/ruby-1.9.3-p551@rails3/gems/cucumber-1.1.2/lib/cucumber/rb_support/rb_language.rb:143:in `load_code_file'
/Users/camillavk/.rvm/gems/ruby-1.9.3-p551@rails3/gems/cucumber-1.1.2/lib/cucumber/runtime/support_code.rb:171:in `load_file'
/Users/camillavk/.rvm/gems/ruby-1.9.3-p551@rails3/gems/cucumber-1.1.2/lib/cucumber/runtime/support_code.rb:83:in `block in load_files!'
/Users/camillavk/.rvm/gems/ruby-1.9.3-p551@rails3/gems/cucumber-1.1.2/lib/cucumber/runtime/support_code.rb:82:in `each'
/Users/camillavk/.rvm/gems/ruby-1.9.3-p551@rails3/gems/cucumber-1.1.2/lib/cucumber/runtime/support_code.rb:82:in `load_files!'
/Users/camillavk/.rvm/gems/ruby-1.9.3-p551@rails3/gems/cucumber-1.1.2/lib/cucumber/runtime.rb:137:in `load_step_definitions'
/Users/camillavk/.rvm/gems/ruby-1.9.3-p551@rails3/gems/cucumber-1.1.2/lib/cucumber/runtime.rb:39:in `run!'
/Users/camillavk/.rvm/gems/ruby-1.9.3-p551@rails3/gems/cucumber-1.1.2/lib/cucumber/cli/main.rb:43:in `execute!'
/Users/camillavk/.rvm/gems/ruby-1.9.3-p551@rails3/gems/cucumber-1.1.2/lib/cucumber/cli/main.rb:20:in `execute'
/Users/camillavk/.rvm/gems/ruby-1.9.3-p551@rails3/gems/cucumber-1.1.2/bin/cucumber:14:in `<top (required)>'
/Users/camillavk/.rvm/gems/ruby-1.9.3-p551@rails3/bin/cucumber:23:in `load'
/Users/camillavk/.rvm/gems/ruby-1.9.3-p551@rails3/bin/cucumber:23:in `<main>'
/Users/camillavk/.rvm/gems/ruby-1.9.3-p551@rails3/bin/ruby_executable_hooks:15:in `eval'
/Users/camillavk/.rvm/gems/ruby-1.9.3-p551@rails3/bin/ruby_executable_hooks:15:in `<main>'
Why is Cucumber not able to run anymore? I assume it is because I upgraded Capybara, but I thought cucumber-rails had capybara already in it so I thought this shouldn't affect it?
Here is the relevant parts of my gemfile:
group :development, :test do
gem 'test-unit', '1.2.3'
# gem 'rspec', '1.3.2'
gem 'rspec-rails', '3.2.0'
end
group :test do
gem 'capybara', '2.2.0'
gem 'cucumber', '1.1.2'
gem 'cucumber-rails', :require => false
gem 'database_cleaner'
end
If it is because of upgrading Capybara, what version of Capybara do I have to downgrade to to have both my Cucumber and Rspec tests able to run?
Aucun commentaire:
Enregistrer un commentaire