This project is archived and is in readonly mode.
uninitialized constant Rack::Mount::Const on Ruby 1.9.2 (AWDwR3, section 12.1)
Reported by Sam Ruby | November 8th, 2009 @ 11:35 AM
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), 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:inconst_missing_with_dependencies' /home/rubys/git/awdwr/work/depot/vendor/rails/actionpack/lib/action_dispatch/routing/route_set.rb:8:in
block in <class:RouteSet>' /home/rubys/git/rack-mount/lib/rack/mount/recognition/code_generation.rb:63:incall' /home/rubys/git/rack-mount/lib/rack/mount/recognition/code_generation.rb:63:in
optimized_each' /home/rubys/git/rack-mount/lib/rack/mount/recognition/code_generation.rb:94:incall' /home/rubys/git/awdwr/work/depot/vendor/rails/actionpack/lib/action_dispatch/routing/route_set.rb:392:in
call' /home/rubys/git/awdwr/work/depot/vendor/rails/actionpack/lib/action_dispatch/middleware/string_coercion.rb:25:incall /home/rubys/.rvm/gems/ruby/1.9.1/gems/rack-1.0.1/lib/rack/head.rb:9:in
call' /home/rubys/.rvm/gems/ruby/1.9.1/gems/rack-1.0.1/lib/rack/methodoverride.rb:24:incall' /home/rubys/git/awdwr/work/depot/vendor/rails/actionpack/lib/action_dispatch/middleware/params_parser.rb:19:in
call' /home/rubys/git/awdwr/work/depot/vendor/rails/actionpack/lib/action_dispatch/middleware/session/abstract_store.rb:149:incall' /home/rubys/git/awdwr/work/depot/vendor/rails/activerecord/lib/active_record/query_cache.rb:29:in
block in call' /home/rubys/git/awdwr/work/depot/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb:34:incache' /home/rubys/git/awdwr/work/depot/vendor/rails/activerecord/lib/active_record/query_cache.rb:9:in
cache /home/rubys/git/awdwr/work/depot/vendor/rails/activerecord/lib/active_record/query_cache.rb:28:incall' /home/rubys/git/awdwr/work/depot/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb:365:in
call' /home/rubys/git/awdwr/work/depot/vendor/rails/actionpack/lib/action_dispatch/middleware/callbacks.rb:46:inblock 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:inrun_callbacks' /home/rubys/git/awdwr/work/depot/vendor/rails/actionpack/lib/action_dispatch/middleware/callbacks.rb:44:in
call' /home/rubys/git/awdwr/work/depot/vendor/rails/actionpack/lib/action_dispatch/middleware/show_exceptions.rb:47:incall' /home/rubys/.rvm/gems/ruby/1.9.1/gems/rack-1.0.1/lib/rack/lock.rb:11:in
block in call' <internal:prelude>;:8:insynchronize'</code> </pre>
Full details here: http://intertwingly.net/projects/AWDwR3/checkdepot-rvm-1.9.2.html#s...
Comments and changes to this ticket
-
josh November 8th, 2009 @ 03:44 PM
- State changed from new to invalid
Rackmount edge has not been tested on rails yet.
Your scripts should be pulling from "git://github.com/rails/rack-mount.git" which is the "stable" rails version of rackmount.
I know a few places in rails reference Const which I removed, don't know how it didn't break on 1.8.7. Thanks for the heads up though.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
<h2 style="font-size: 14px">Tickets have moved to Github</h2>
The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>