This project is archived and is in readonly mode.
Make sure all autoload constants are pulled in when using config.threadsafe!
Reported by Michael Koziarski | February 1st, 2009 @ 02:15 AM
As you can never rely on constants being defined while requests are being processed
Comments and changes to this ticket
-
Repository February 5th, 2009 @ 10:44 PM
- State changed from new to resolved
(from [c96382a71a77505ea2f51e43bc81fdb3ac95d117]) Make sure all autoload constants are pulled in when using config.threadsafe! [#1831 state:resolved] http://github.com/rails/rails/co...
-
Justin Coyne November 17th, 2009 @ 04:42 PM
- Assigned user changed from josh to Michael Koziarski
I'm running a multithreaded rake task under jruby and I think I've found an intermittent error where ActiveSupport::Multibyte is not getting preloaded when config.threadsafe! is set:
rake aborted!
uninitialized constant ActiveSupport::Multibyte
/home/jcoyne/jruby/jruby-1.4.0/lib/ruby/gems/1.8/gems/activerecord-2.3.4/lib/active_record/connection_adapters/abstract/connection_pool.rb:95:inconst_missing' /home/jcoyne/jruby/jruby-1.4.0/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2503:in
const_missing' /home/jcoyne/jruby/jruby-1.4.0/lib/ruby/gems/1.8/gems/activerecord-2.3.4/lib/active_record/connection_adapters/abstract/quoting.rb:10:inquote' /home/jcoyne/jruby/jruby-1.4.0/lib/ruby/gems/1.8/gems/activerecord-jdbc-adapter-0.9.2/lib/jdbc_adapter/jdbc_mysql.rb:87:in
quote' /home/jcoyne/jruby/jruby-1.4.0/lib/ruby/gems/1.8/gems/activerecord-2.3.4/lib/active_record/base.rb:2993:inquote_value' /home/jcoyne/jruby/jruby-1.4.0/lib/ruby/gems/1.8/gems/activerecord-2.3.4/lib/active_record/base.rb:2507:in
quoted_id' /home/jcoyne/jruby/jruby-1.4.0/lib/ruby/gems/1.8/gems/activerecord-2.3.4/lib/active_record/associations/association_proxy.rb:275:inowner_quoted_id' /home/jcoyne/jruby/jruby-1.4.0/lib/ruby/gems/1.8/gems/activerecord-2.3.4/lib/active_record/associations/has_and_belongs_to_many_association.rb:98:in
construct_sql' /home/jcoyne/jruby/jruby-1.4.0/lib/ruby/gems/1.8/gems/activerecord-2.3.4/lib/active_record/associations/association_collection.rb:21:ininitialize' /home/jcoyne/jruby/jruby-1.4.0/lib/ruby/gems/1.8/gems/activerecord-2.3.4/lib/active_record/associations/has_and_belongs_to_many_association.rb:5:in
initialize' /home/jcoyne/jruby/jruby-1.4.0/lib/ruby/gems/1.8/gems/activerecord-2.3.4/lib/active_record/associations.rb:1297:innew' /home/jcoyne/jruby/jruby-1.4.0/lib/ruby/gems/1.8/gems/activerecord-2.3.4/lib/active_record/associations.rb:1297:in
flags' /home/jcoyne/jruby/jruby-1.4.0/lib/ruby/gems/1.8/gems/activerecord-2.3.4/lib/active_record/associations.rb:1321:inflags='
-
Justin Coyne November 17th, 2009 @ 08:57 PM
I've also hit upon this with HTML::Tokenizer inside of actioncontroller
uninitialized constant HTML::Tokenizer /home/jcoyne/jruby/jruby-1.4.0/lib/ruby/gems/1.8/gems/activesupport-2.3.4/lib/active_support/core_ext/class/inheritable_attributes.rb:113:in `const_missing' /home/jcoyne/jruby/jruby-1.4.0/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2503:in `const_missing' /home/jcoyne/jruby/jruby-1.4.0/lib/ruby/gems/1.8/gems/actionpack-2.3.4/lib/action_controller/vendor/html-scanner/html/sanitizer.rb:14:in `tokenize' /home/jcoyne/jruby/jruby-1.4.0/lib/ruby/gems/1.8/gems/actionpack-2.3.4/lib/action_controller/vendor/html-scanner/html/sanitizer.rb:5:in `sanitize' /home/jcoyne/jruby/jruby-1.4.0/lib/ruby/gems/1.8/gems/actionpack-2.3.4/lib/action_controller/vendor/html-scanner/html/sanitizer.rb:30:in `sanitize'
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>
People watching this ticket
Referenced by
- 1831 Make sure all autoload constants are pulled in when using config.threadsafe! (from [c96382a71a77505ea2f51e43bc81fdb3ac95d117]) Make su...