Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

Ticket #10596 (closed defect: fixed)

Opened 1 year ago

Last modified 1 year ago

ActionPack tests fail with "no such file to load -- dispatcher"

Reported by: alexey Assigned to: core
Priority: normal Milestone: 2.x
Component: ActionPack Version: edge
Severity: normal Keywords:
Cc:

Description

ActionPack, since rev 8413

'rake test' fails on the CI server, with "no such file to load -- dispatcher".

Reason:

dispatcher.rb that needs to be loaded is at railties/lib. this directory is added to RUBYPATH by integration_test.rb. However, on the CI server (unlike developers' computers) request_test.rb is loaded before integration_test.rb, ties to require 'dispatcher', and - kaboom!

Full exception from http://cruisecontrolrb.thoughtworks.com/builds/RubyOnRails/8413:

/usr/lib/ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require': no such file to load -- dispatcher (MissingSourceFile) 
from /usr/lib/ruby/1.8/rubygems/custom_require.rb:27:in `require' 
from ./test/controller/../../lib/../../activesupport/lib/active_support/dependencies.rb:496:in `require' 
from ./test/controller/../../lib/../../activesupport/lib/active_support/dependencies.rb:342:in `new_constants_in' 
from ./test/controller/../../lib/../../activesupport/lib/active_support/dependencies.rb:496:in `require' 
from ./test/controller/session/../../../lib/action_controller/integration.rb:1  
from /usr/lib/ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require' 
from /usr/lib/ruby/1.8/rubygems/custom_require.rb:27:in `require' 
from ./test/controller/../../lib/../../activesupport/lib/active_support/dependencies.rb:496:in `require' 
... 6 levels... 
from ./test/controller/../../lib/../../activesupport/lib/active_support/dependencies.rb:489:in `load' 
from /usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake/rake_test_loader.rb:5 
from /usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake/rake_test_loader.rb:5:in `each' 
from /usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake/rake_test_loader.rb:5 
rake aborted!

Attachments

adding_railties_to_rubypath.patch (0.9 kB) - added by alexey on 12/22/07 18:57:29.

Change History

12/22/07 18:57:29 changed by alexey

  • attachment adding_railties_to_rubypath.patch added.

12/22/07 18:58:05 changed by alexey

  • summary changed from ActionPack tests fail with "no such file to load -- dispatcher" to [PATCH] ActionPack tests fail with "no such file to load -- dispatcher".

12/22/07 18:59:42 changed by alexey

  • summary changed from [PATCH] ActionPack tests fail with "no such file to load -- dispatcher" to ActionPack tests fail with "no such file to load -- dispatcher".

actually, my patch is wrong, both of those tests should just require action_controller/dispatcher instead, and not add railties to $:

12/22/07 19:03:04 changed by bitsweat

  • status changed from new to closed.
  • resolution set to fixed.

(In [8483]) Integration tests use ActionController::Dispatcher rather than the old Dispatcher. Closes #10596.