ActiveRecord autoloading classes

24 views
Skip to first unread message

Jie

unread,
Sep 20, 2018, 3:20:46 PM9/20/18
to Ruby on Rails: Talk
In rails/activerecord/lib/active_record.rb, why are some classes autoloaded while other are eager_autoloaded?

Specifically, I'm looking into an error with the message "uninitialized constant ActiveRecord::Core::ClassMethods::StatementCache Did you mean? ActiveRecord::StatementCache". This recently showed up in my Sidekiq process logs, but happens infrequently and I haven't been able to reproduce it. It seems like a concurrency bug with class-loading in ActiveRecord - could it happen when a process gets restarted and multiple threads are trying to load ActiveRecord classes at the same time?

Any pointers would be helpful. Thanks!
Reply all
Reply to author
Forward
Message has been deleted
0 new messages