Scenario:
1. Start server
2. ruby script/generate controller info who_bought
3. curl --silent http://localhost:3000/info/who_bought/3
Even in development mode, a server restart is normally required
in order to "see" this route (see ticket #3407 Server restart required after generate controller), but
even so, the response should be No route matches
"/info/who_bought/" instead of a stack traceback.
Problem occurs when rack-mount with the following commit or
later:
commit 90fcd5eb7731b8c799add504de96b58db267dd8a
Author: Joshua Peek <josh@joshpeek.com>
Date: Sat Nov 7 15:26:05 2009 -0500
dismantle Const
Problem occurs on Ruby 1.9.2, but not on Ruby 1.8.7.
Symptoms:
/home/rubys/git/awdwr/work/depot/vendor/rails/activesupport/lib/active_support/dependencies.rb:456:in rescue in load_missing_constant'
/home/rubys/git/awdwr/work/depot/vendor/rails/activesupport/lib/active_support/dependencies.rb:452:inload_missing_constant'
/home/rubys/git/awdwr/work/depot/vendor/rails/activesupport/lib/active_support/dependencies.rb:91:in const_missing_with_dependencies'
/home/rubys/git/awdwr/work/depot/vendor/rails/actionpack/lib/action_dispatch/routing/route_set.rb:8:inblock in <class:RouteSet>'
/home/rubys/git/rack-mount/lib/rack/mount/recognition/code_generation.rb:63:in call'
/home/rubys/git/rack-mount/lib/rack/mount/recognition/code_generation.rb:63:inoptimized_each'
/home/rubys/git/rack-mount/lib/rack/mount/recognition/code_generation.rb:94:in call'
/home/rubys/git/awdwr/work/depot/vendor/rails/actionpack/lib/action_dispatch/routing/route_set.rb:392:incall'
/home/rubys/git/awdwr/work/depot/vendor/rails/actionpack/lib/action_dispatch/middleware/string_coercion.rb:25:in call
/home/rubys/.rvm/gems/ruby/1.9.1/gems/rack-1.0.1/lib/rack/head.rb:9:incall'
/home/rubys/.rvm/gems/ruby/1.9.1/gems/rack-1.0.1/lib/rack/methodoverride.rb:24:in call'
/home/rubys/git/awdwr/work/depot/vendor/rails/actionpack/lib/action_dispatch/middleware/params_parser.rb:19:incall'
/home/rubys/git/awdwr/work/depot/vendor/rails/actionpack/lib/action_dispatch/middleware/session/abstract_store.rb:149:in call'
/home/rubys/git/awdwr/work/depot/vendor/rails/activerecord/lib/active_record/query_cache.rb:29:inblock in call'
/home/rubys/git/awdwr/work/depot/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb:34:in cache'
/home/rubys/git/awdwr/work/depot/vendor/rails/activerecord/lib/active_record/query_cache.rb:9:incache
/home/rubys/git/awdwr/work/depot/vendor/rails/activerecord/lib/active_record/query_cache.rb:28:in call'
/home/rubys/git/awdwr/work/depot/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb:365:incall'
/home/rubys/git/awdwr/work/depot/vendor/rails/actionpack/lib/action_dispatch/middleware/callbacks.rb:46:in block in call'
/home/rubys/git/awdwr/work/depot/vendor/rails/activesupport/lib/active_support/callbacks.rb:428:in_run_call_callbacks'
/home/rubys/git/awdwr/work/depot/vendor/rails/activesupport/lib/active_support/callbacks.rb:87:in run_callbacks'
/home/rubys/git/awdwr/work/depot/vendor/rails/actionpack/lib/action_dispatch/middleware/callbacks.rb:44:incall'
/home/rubys/git/awdwr/work/depot/vendor/rails/actionpack/lib/action_dispatch/middleware/show_exceptions.rb:47:in call'
/home/rubys/.rvm/gems/ruby/1.9.1/gems/rack-1.0.1/lib/rack/lock.rb:11:inblock in call'
<internal:prelude>;:8:in synchronize'</code>
</pre>
Full details here: http://intertwingly.net/projects/AWDwR3/checkdepot-rvm-1.9.2.html#s...