Rails: Rake gives Zeitwerk error when mentioning one model class in another

I hope this is the right place to ask for help on this really weird error message. I tried on stackoverflow but it seems a bit too much in the weeds of zeitwerk for them. I wouldn’t bother the people here with a ‘normal’ error but after doing some debugging I seem to have traced this down to some really weird issues loading my models when I’m in a rake task (like db:seeds) and I don’t know enough about rails internals to even have a clue what could be going on. If this is the wrong place, I’m sorry.

This is on rails 6.1.4, ruby 3.1

Everything runs fine in normal operation but when I try to use some of my models from inside a rake task (e.g. code in seeds.rb) I get the following error:

TypeError: superclass mismatch for class Comment

I’ve been able to narrow down the problem to the fact that I mention the Comment class in my Question model. Even just mentioning the Comment class inside a puts is enough as in the following code.

class Question < ApplicationRecord
  include JsonHelpers
  include PostableHelpers

  puts "#{Comment.inspect}"   #If I delete this line no issue
end

(In my real code I have a class macro which creates a polymorphic belongs_to and takes the allowed related classes to define some utility methods and validation which is why I want to reference the other class name like this).

I still get the error even when I comment out the entire content of the Comment class so it becomes just

class Comment < ApplicationRecord
end

This doesn’t seem to cause any issue when I’m just running the web server but happens whenever I try and reference a model which ends up loading the Question class somehow.

I mean, if I go through the error it seems to follow the instances where I mention another model’s class at the top level in a model like the example with the Question class, e.g. Tagging references the Post class, Post references Question and Question references Comment. However, the Comment class doesn’t directly reference any other model Class (though it has the usual declaration of associations).

For completeness, I’ve included the full trace of the rake task error below as well as the brief version. I’m happy to add any other information that might help but

TypeError: superclass mismatch for class Comment
/Users/TruePath/Build/math-site/app/models/comment.rb:1:in `<main>'
/Users/TruePath/Build/math-site/app/models/question.rb:6:in `<class:Question>'
/Users/TruePath/Build/math-site/app/models/question.rb:1:in `<main>'
/Users/TruePath/Build/math-site/app/models/post.rb:18:in `<class:Post>'
/Users/TruePath/Build/math-site/app/models/post.rb:1:in `<main>'
/Users/TruePath/Build/math-site/app/models/tagging.rb:5:in `<class:Tagging>'
/Users/TruePath/Build/math-site/app/models/tagging.rb:1:in `<main>'
/Users/TruePath/Build/math-site/app/models/page.rb:207:in `update_history'
/Users/TruePath/Build/math-site/app/models/page.rb:101:in `build_by_user'
/Users/TruePath/Build/math-site/lib/tasks/create_default_models.rake:19:in `block (3 levels) in <main>'
/Users/TruePath/Build/math-site/lib/tasks/create_default_models.rake:4:in `block (2 levels) in <main>'
/opt/local/bin/ruby_executable_hooks3.1:22:in `eval'
/opt/local/bin/ruby_executable_hooks3.1:22:in `<main>'
Tasks: TOP => db:create_default_models
(See full trace by running task with --trace)

Here’s what I get when I run with trace.

rake aborted!
TypeError: superclass mismatch for class Comment
/Users/TruePath/Build/math-site/app/models/comment.rb:1:in `<main>'
/opt/local/lib/ruby3.1/gems/3.1.0/gems/bootsnap-1.10.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
/opt/local/lib/ruby3.1/gems/3.1.0/gems/bootsnap-1.10.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
/opt/local/lib/ruby3.1/gems/3.1.0/gems/zeitwerk-2.5.4/lib/zeitwerk/kernel.rb:27:in `require'
/Users/TruePath/Build/math-site/app/models/question.rb:8:in `<class:Question>'
/Users/TruePath/Build/math-site/app/models/question.rb:1:in `<main>'
/opt/local/lib/ruby3.1/gems/3.1.0/gems/bootsnap-1.10.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
/opt/local/lib/ruby3.1/gems/3.1.0/gems/bootsnap-1.10.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
/opt/local/lib/ruby3.1/gems/3.1.0/gems/zeitwerk-2.5.4/lib/zeitwerk/kernel.rb:27:in `require'
/Users/TruePath/Build/math-site/app/models/post.rb:18:in `<class:Post>'
/Users/TruePath/Build/math-site/app/models/post.rb:1:in `<main>'
/opt/local/lib/ruby3.1/gems/3.1.0/gems/bootsnap-1.10.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
/opt/local/lib/ruby3.1/gems/3.1.0/gems/bootsnap-1.10.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
/opt/local/lib/ruby3.1/gems/3.1.0/gems/zeitwerk-2.5.4/lib/zeitwerk/kernel.rb:27:in `require'
/Users/TruePath/Build/math-site/app/models/tagging.rb:5:in `<class:Tagging>'
/Users/TruePath/Build/math-site/app/models/tagging.rb:1:in `<main>'
/opt/local/lib/ruby3.1/gems/3.1.0/gems/bootsnap-1.10.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
/opt/local/lib/ruby3.1/gems/3.1.0/gems/bootsnap-1.10.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
/opt/local/lib/ruby3.1/gems/3.1.0/gems/zeitwerk-2.5.4/lib/zeitwerk/kernel.rb:27:in `require'
/opt/local/lib/ruby3.1/gems/3.1.0/gems/activesupport-6.1.4/lib/active_support/inflector/methods.rb:288:in `const_get'
/opt/local/lib/ruby3.1/gems/3.1.0/gems/activesupport-6.1.4/lib/active_support/inflector/methods.rb:288:in `block in constantize'
/opt/local/lib/ruby3.1/gems/3.1.0/gems/activesupport-6.1.4/lib/active_support/inflector/methods.rb:284:in `each'
/opt/local/lib/ruby3.1/gems/3.1.0/gems/activesupport-6.1.4/lib/active_support/inflector/methods.rb:284:in `inject'
/opt/local/lib/ruby3.1/gems/3.1.0/gems/activesupport-6.1.4/lib/active_support/inflector/methods.rb:284:in `constantize'
/opt/local/lib/ruby3.1/gems/3.1.0/gems/activesupport-6.1.4/lib/active_support/inflector/methods.rb:330:in `safe_constantize'
/opt/local/lib/ruby3.1/gems/3.1.0/gems/activesupport-6.1.4/lib/active_support/dependencies/zeitwerk_integration.rb:23:in `safe_constantize'
/opt/local/lib/ruby3.1/gems/3.1.0/gems/activerecord-6.1.4/lib/active_record/inheritance.rb:230:in `block in compute_type'
/opt/local/lib/ruby3.1/gems/3.1.0/gems/activerecord-6.1.4/lib/active_record/inheritance.rb:229:in `each'
/opt/local/lib/ruby3.1/gems/3.1.0/gems/activerecord-6.1.4/lib/active_record/inheritance.rb:229:in `compute_type'
/opt/local/lib/ruby3.1/gems/3.1.0/gems/activerecord-6.1.4/lib/active_record/reflection.rb:409:in `compute_class'
/opt/local/lib/ruby3.1/gems/3.1.0/gems/activerecord-6.1.4/lib/active_record/reflection.rb:366:in `klass'
/opt/local/lib/ruby3.1/gems/3.1.0/gems/activerecord-6.1.4/lib/active_record/reflection.rb:791:in `source_reflection'
/opt/local/lib/ruby3.1/gems/3.1.0/gems/activerecord-6.1.4/lib/active_record/reflection.rb:932:in `check_validity!'
/opt/local/lib/ruby3.1/gems/3.1.0/gems/activerecord-6.1.4/lib/active_record/associations/association.rb:41:in `initialize'
/opt/local/lib/ruby3.1/gems/3.1.0/gems/activerecord-6.1.4/lib/active_record/associations/has_many_through_association.rb:10:in `initialize'
/opt/local/lib/ruby3.1/gems/3.1.0/gems/activerecord-6.1.4/lib/active_record/associations.rb:315:in `new'
/opt/local/lib/ruby3.1/gems/3.1.0/gems/activerecord-6.1.4/lib/active_record/associations.rb:315:in `association'
/opt/local/lib/ruby3.1/gems/3.1.0/gems/activerecord-6.1.4/lib/active_record/associations/builder/association.rb:103:in `tags'
/Users/TruePath/Build/math-site/app/models/page.rb:207:in `update_history'
/Users/TruePath/Build/math-site/app/models/page.rb:101:in `build_by_user'
/Users/TruePath/Build/math-site/db/seeds.rb:99:in `block in <main>'
/opt/local/lib/ruby3.1/gems/3.1.0/gems/activerecord-6.1.4/lib/active_record/connection_adapters/abstract/database_statements.rb:320:in `block in transaction'
/opt/local/lib/ruby3.1/gems/3.1.0/gems/activerecord-6.1.4/lib/active_record/connection_adapters/abstract/transaction.rb:319:in `block in within_new_transaction'
/opt/local/lib/ruby3.1/gems/3.1.0/gems/activesupport-6.1.4/lib/active_support/concurrency/load_interlock_aware_monitor.rb:26:in `block (2 levels) in synchronize'
/opt/local/lib/ruby3.1/gems/3.1.0/gems/activesupport-6.1.4/lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:in `handle_interrupt'
/opt/local/lib/ruby3.1/gems/3.1.0/gems/activesupport-6.1.4/lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:in `block in synchronize'
/opt/local/lib/ruby3.1/gems/3.1.0/gems/activesupport-6.1.4/lib/active_support/concurrency/load_interlock_aware_monitor.rb:21:in `handle_interrupt'
/opt/local/lib/ruby3.1/gems/3.1.0/gems/activesupport-6.1.4/lib/active_support/concurrency/load_interlock_aware_monitor.rb:21:in `synchronize'
/opt/local/lib/ruby3.1/gems/3.1.0/gems/activerecord-6.1.4/lib/active_record/connection_adapters/abstract/transaction.rb:317:in `within_new_transaction'
/opt/local/lib/ruby3.1/gems/3.1.0/gems/activerecord-6.1.4/lib/active_record/connection_adapters/abstract/database_statements.rb:320:in `transaction'
/opt/local/lib/ruby3.1/gems/3.1.0/gems/activerecord-6.1.4/lib/active_record/transactions.rb:209:in `transaction'
/Users/TruePath/Build/math-site/db/seeds.rb:84:in `<main>'
/opt/local/lib/ruby3.1/gems/3.1.0/gems/bootsnap-1.10.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:48:in `load'
/opt/local/lib/ruby3.1/gems/3.1.0/gems/bootsnap-1.10.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:48:in `load'
/opt/local/lib/ruby3.1/gems/3.1.0/gems/railties-6.1.4/lib/rails/engine.rb:566:in `block in load_seed'
/opt/local/lib/ruby3.1/gems/3.1.0/gems/activesupport-6.1.4/lib/active_support/callbacks.rb:117:in `block in run_callbacks'
/opt/local/lib/ruby3.1/gems/3.1.0/gems/activesupport-6.1.4/lib/active_support/execution_wrapper.rb:88:in `wrap'
/opt/local/lib/ruby3.1/gems/3.1.0/gems/railties-6.1.4/lib/rails/engine.rb:640:in `block (2 levels) in <class:Engine>'
/opt/local/lib/ruby3.1/gems/3.1.0/gems/activesupport-6.1.4/lib/active_support/callbacks.rb:126:in `instance_exec'
/opt/local/lib/ruby3.1/gems/3.1.0/gems/activesupport-6.1.4/lib/active_support/callbacks.rb:126:in `block in run_callbacks'
/opt/local/lib/ruby3.1/gems/3.1.0/gems/activesupport-6.1.4/lib/active_support/callbacks.rb:137:in `run_callbacks'
/opt/local/lib/ruby3.1/gems/3.1.0/gems/railties-6.1.4/lib/rails/engine.rb:566:in `load_seed'
/opt/local/lib/ruby3.1/gems/3.1.0/gems/activerecord-6.1.4/lib/active_record/tasks/database_tasks.rb:450:in `load_seed'
/opt/local/lib/ruby3.1/gems/3.1.0/gems/activerecord-6.1.4/lib/active_record/railties/databases.rake:392:in `block (2 levels) in <main>'
/opt/local/lib/ruby3.1/gems/3.1.0/gems/rake-13.0.6/lib/rake/task.rb:281:in `block in execute'
/opt/local/lib/ruby3.1/gems/3.1.0/gems/rake-13.0.6/lib/rake/task.rb:281:in `each'
/opt/local/lib/ruby3.1/gems/3.1.0/gems/rake-13.0.6/lib/rake/task.rb:281:in `execute'
/opt/local/lib/ruby3.1/gems/3.1.0/gems/rake-13.0.6/lib/rake/task.rb:219:in `block in invoke_with_call_chain'
/opt/local/lib/ruby3.1/gems/3.1.0/gems/rake-13.0.6/lib/rake/task.rb:199:in `synchronize'
/opt/local/lib/ruby3.1/gems/3.1.0/gems/rake-13.0.6/lib/rake/task.rb:199:in `invoke_with_call_chain'
/opt/local/lib/ruby3.1/gems/3.1.0/gems/rake-13.0.6/lib/rake/task.rb:188:in `invoke'
/opt/local/lib/ruby3.1/gems/3.1.0/gems/rake-13.0.6/lib/rake/application.rb:160:in `invoke_task'
/opt/local/lib/ruby3.1/gems/3.1.0/gems/rake-13.0.6/lib/rake/application.rb:116:in `block (2 levels) in top_level'
/opt/local/lib/ruby3.1/gems/3.1.0/gems/rake-13.0.6/lib/rake/application.rb:116:in `each'
/opt/local/lib/ruby3.1/gems/3.1.0/gems/rake-13.0.6/lib/rake/application.rb:116:in `block in top_level'
/opt/local/lib/ruby3.1/gems/3.1.0/gems/rake-13.0.6/lib/rake/application.rb:125:in `run_with_threads'
/opt/local/lib/ruby3.1/gems/3.1.0/gems/rake-13.0.6/lib/rake/application.rb:110:in `top_level'
/opt/local/lib/ruby3.1/gems/3.1.0/gems/rake-13.0.6/lib/rake/application.rb:83:in `block in run'
/opt/local/lib/ruby3.1/gems/3.1.0/gems/rake-13.0.6/lib/rake/application.rb:186:in `standard_exception_handling'
/opt/local/lib/ruby3.1/gems/3.1.0/gems/rake-13.0.6/lib/rake/application.rb:80:in `run'
/opt/local/lib/ruby3.1/gems/3.1.0/gems/rake-13.0.6/exe/rake:27:in `<top (required)>'
/opt/local/bin/rake:25:in `load'
/opt/local/bin/rake:25:in `<main>'
/opt/local/bin/ruby_executable_hooks3.1:22:in `eval'
/opt/local/bin/ruby_executable_hooks3.1:22:in `<main>'
Tasks: TOP => db:seed

Just a hint of what direction to go in would be very helpful. Or if there is some problem with some kind of circular constant dependency or something that

Oops, I forgot to delete the part about the Comment class having the usual associations when I went back and tried commenting out the content of the Comment class. You can assume that the Comment class is empty since the error still occurs then.

This is weird, I suspect someone is creating a Comment class that does not inherit from ApplicationRecord, so the superclass mismatch is a symptom of a class defined in an unexpected place.

Could you please enabled logging in config/application.rb:

Rails.autoloaders.log!

? Then, you could show the output for a successful autoload like the one triggered by

bin/rails runner Comment

After it, show the output in a run that triggers the error.

Ok, here’s the successful run

Running via Spring preloader in process 49136
Zeitwerk@rails.main: constant VotableHelpers loaded from file /Users/TruePath/Build/math-site/app/models/concerns/votable_helpers.rb
Zeitwerk@rails.main: constant NotificationHelpers loaded from file /Users/TruePath/Build/math-site/app/models/concerns/notification_helpers.rb
Zeitwerk@rails.main: constant AlertHelpers loaded from file /Users/TruePath/Build/math-site/app/models/concerns/alert_helpers.rb
Zeitwerk@rails.main: constant Comment loaded from file /Users/TruePath/Build/math-site/app/models/comment.rb

I’m splitting the failing run into two replies since I hit the reply limit.

Zeitwerk@rails.once: the namespace ActionText already exists, descending into /opt/local/lib/ruby3.1/gems/3.1.0/gems/actiontext-6.1.5/app/helpers/action_text
Zeitwerk@rails.once: autoload set for ActionText::TagHelper, to be loaded from /opt/local/lib/ruby3.1/gems/3.1.0/gems/actiontext-6.1.5/app/helpers/action_text/tag_helper.rb
Zeitwerk@rails.once: autoload set for ActionText::ContentHelper, to be loaded from /opt/local/lib/ruby3.1/gems/3.1.0/gems/actiontext-6.1.5/app/helpers/action_text/content_helper.rb
Zeitwerk@rails.once: the namespace ActionText already exists, descending into /opt/local/lib/ruby3.1/gems/3.1.0/gems/actiontext-6.1.5/app/models/action_text
Zeitwerk@rails.once: autoload set for ActionText::RichText, to be loaded from /opt/local/lib/ruby3.1/gems/3.1.0/gems/actiontext-6.1.5/app/models/action_text/rich_text.rb
Zeitwerk@rails.once: autoload set for ActionText::Record, to be loaded from /opt/local/lib/ruby3.1/gems/3.1.0/gems/actiontext-6.1.5/app/models/action_text/record.rb
Zeitwerk@rails.main: autoload set for ApplicationCable, to be autovivified from /Users/TruePath/Build/math-site/app/channels/application_cable
Zeitwerk@rails.main: autoload set for ApplicationController, to be loaded from /Users/TruePath/Build/math-site/app/controllers/application_controller.rb
Zeitwerk@rails.main: autoload set for CitesController, to be loaded from /Users/TruePath/Build/math-site/app/controllers/cites_controller.rb
Zeitwerk@rails.main: autoload set for PublicationsController, to be loaded from /Users/TruePath/Build/math-site/app/controllers/publications_controller.rb
Zeitwerk@rails.main: autoload set for CommentsController, to be loaded from /Users/TruePath/Build/math-site/app/controllers/comments_controller.rb
Zeitwerk@rails.main: autoload set for PagesController, to be loaded from /Users/TruePath/Build/math-site/app/controllers/pages_controller.rb
Zeitwerk@rails.main: autoload set for TagsController, to be loaded from /Users/TruePath/Build/math-site/app/controllers/tags_controller.rb
Zeitwerk@rails.main: autoload set for WorksController, to be loaded from /Users/TruePath/Build/math-site/app/controllers/works_controller.rb
Zeitwerk@rails.main: autoload set for NotificationsController, to be loaded from /Users/TruePath/Build/math-site/app/controllers/notifications_controller.rb
Zeitwerk@rails.main: autoload set for FeedsController, to be loaded from /Users/TruePath/Build/math-site/app/controllers/feeds_controller.rb
Zeitwerk@rails.main: autoload set for ResponsesController, to be loaded from /Users/TruePath/Build/math-site/app/controllers/responses_controller.rb
Zeitwerk@rails.main: autoload set for ArticlesController, to be loaded from /Users/TruePath/Build/math-site/app/controllers/articles_controller.rb
Zeitwerk@rails.main: autoload set for QuestionsController, to be loaded from /Users/TruePath/Build/math-site/app/controllers/questions_controller.rb
Zeitwerk@rails.main: autoload set for PageChangesController, to be loaded from /Users/TruePath/Build/math-site/app/controllers/page_changes_controller.rb
Zeitwerk@rails.main: autoload set for UsersController, to be loaded from /Users/TruePath/Build/math-site/app/controllers/users_controller.rb
Zeitwerk@rails.main: autoload set for HomeController, to be loaded from /Users/TruePath/Build/math-site/app/controllers/home_controller.rb
Zeitwerk@rails.main: autoload set for Users, to be autovivified from /Users/TruePath/Build/math-site/app/controllers/users
Zeitwerk@rails.main: autoload set for AlertsController, to be loaded from /Users/TruePath/Build/math-site/app/controllers/alerts_controller.rb
Zeitwerk@rails.main: autoload set for ClaimsController, to be loaded from /Users/TruePath/Build/math-site/app/controllers/claims_controller.rb
Zeitwerk@rails.main: autoload set for ReviewsController, to be loaded from /Users/TruePath/Build/math-site/app/controllers/reviews_controller.rb
Zeitwerk@rails.main: autoload set for UserListsController, to be loaded from /Users/TruePath/Build/math-site/app/controllers/user_lists_controller.rb
Zeitwerk@rails.main: autoload set for PostsController, to be loaded from /Users/TruePath/Build/math-site/app/controllers/posts_controller.rb
Zeitwerk@rails.main: autoload set for CommentThreadsController, to be loaded from /Users/TruePath/Build/math-site/app/controllers/comment_threads_controller.rb
Zeitwerk@rails.main: autoload set for JournalsController, to be loaded from /Users/TruePath/Build/math-site/app/controllers/journals_controller.rb
Zeitwerk@rails.main: autoload set for JsonApiController, to be loaded from /Users/TruePath/Build/math-site/app/controllers/concerns/json_api_controller.rb
Zeitwerk@rails.main: autoload set for VotableController, to be loaded from /Users/TruePath/Build/math-site/app/controllers/concerns/votable_controller.rb
Zeitwerk@rails.main: autoload set for PostableController, to be loaded from /Users/TruePath/Build/math-site/app/controllers/concerns/postable_controller.rb
Zeitwerk@rails.main: autoload set for FulltextSearchController, to be loaded from /Users/TruePath/Build/math-site/app/controllers/concerns/fulltext_search_controller.rb
Zeitwerk@rails.main: autoload set for ValidatesController, to be loaded from /Users/TruePath/Build/math-site/app/controllers/concerns/validates_controller.rb
Zeitwerk@rails.main: autoload set for StreamController, to be loaded from /Users/TruePath/Build/math-site/app/controllers/concerns/stream_controller.rb
Zeitwerk@rails.main: autoload set for CollectionController, to be loaded from /Users/TruePath/Build/math-site/app/controllers/concerns/collection_controller.rb
Zeitwerk@rails.main: autoload set for ArchivableController, to be loaded from /Users/TruePath/Build/math-site/app/controllers/concerns/archivable_controller.rb
Zeitwerk@rails.main: autoload set for PolicyController, to be loaded from /Users/TruePath/Build/math-site/app/controllers/concerns/policy_controller.rb
Zeitwerk@rails.main: autoload set for AutocompleteController, to be loaded from /Users/TruePath/Build/math-site/app/controllers/concerns/autocomplete_controller.rb
Zeitwerk@rails.main: autoload set for ReviewsHelper, to be loaded from /Users/TruePath/Build/math-site/app/helpers/reviews_helper.rb
Zeitwerk@rails.main: autoload set for CommentsHelper, to be loaded from /Users/TruePath/Build/math-site/app/helpers/comments_helper.rb
Zeitwerk@rails.main: autoload set for CitesHelper, to be loaded from /Users/TruePath/Build/math-site/app/helpers/cites_helper.rb
Zeitwerk@rails.main: autoload set for UserListsHelper, to be loaded from /Users/TruePath/Build/math-site/app/helpers/user_lists_helper.rb
Zeitwerk@rails.main: autoload set for NotificationsHelper, to be loaded from /Users/TruePath/Build/math-site/app/helpers/notifications_helper.rb
Zeitwerk@rails.main: autoload set for ArticlesHelper, to be loaded from /Users/TruePath/Build/math-site/app/helpers/articles_helper.rb
Zeitwerk@rails.main: autoload set for JournalsHelper, to be loaded from /Users/TruePath/Build/math-site/app/helpers/journals_helper.rb
Zeitwerk@rails.main: autoload set for UsersHelper, to be loaded from /Users/TruePath/Build/math-site/app/helpers/users_helper.rb
Zeitwerk@rails.main: autoload set for PublicationsHelper, to be loaded from /Users/TruePath/Build/math-site/app/helpers/publications_helper.rb
Zeitwerk@rails.main: autoload set for FeedsHelper, to be loaded from /Users/TruePath/Build/math-site/app/helpers/feeds_helper.rb
Zeitwerk@rails.main: autoload set for ClaimsHelper, to be loaded from /Users/TruePath/Build/math-site/app/helpers/claims_helper.rb
Zeitwerk@rails.main: autoload set for ApplicationHelper, to be loaded from /Users/TruePath/Build/math-site/app/helpers/application_helper.rb
Zeitwerk@rails.main: autoload set for ApplicationJob, to be loaded from /Users/TruePath/Build/math-site/app/jobs/application_job.rb
Zeitwerk@rails.main: autoload set for ApplicationMailer, to be loaded from /Users/TruePath/Build/math-site/app/mailers/application_mailer.rb
Zeitwerk@rails.main: autoload set for EnhancedParameters, to be loaded from /Users/TruePath/Build/math-site/app/misc/enhanced_parameters.rb
Zeitwerk@rails.main: autoload set for SharedConstants, to be loaded from /Users/TruePath/Build/math-site/app/misc/shared_constants.rb
Zeitwerk@rails.main: autoload set for PubMetadataFetcher, to be loaded from /Users/TruePath/Build/math-site/app/misc/pub_metadata_fetcher.rb
Zeitwerk@rails.main: autoload set for BibtexAttribute, to be loaded from /Users/TruePath/Build/math-site/app/misc/bibtex_attribute.rb
Zeitwerk@rails.main: autoload set for CustomBibEntry, to be loaded from /Users/TruePath/Build/math-site/app/misc/custom_bib_entry.rb
Zeitwerk@rails.main: autoload set for MetadataHash, to be loaded from /Users/TruePath/Build/math-site/app/misc/metadata_hash.rb
Zeitwerk@rails.main: autoload set for PageChange, to be loaded from /Users/TruePath/Build/math-site/app/models/page_change.rb
Zeitwerk@rails.main: autoload set for Alert, to be loaded from /Users/TruePath/Build/math-site/app/models/alert.rb
Zeitwerk@rails.main: autoload set for Article, to be loaded from /Users/TruePath/Build/math-site/app/models/article.rb
Zeitwerk@rails.main: autoload set for Tag, to be loaded from /Users/TruePath/Build/math-site/app/models/tag.rb
Zeitwerk@rails.main: autoload set for Tagging, to be loaded from /Users/TruePath/Build/math-site/app/models/tagging.rb
Zeitwerk@rails.main: autoload set for Publication, to be loaded from /Users/TruePath/Build/math-site/app/models/publication.rb
Zeitwerk@rails.main: autoload set for Reference, to be loaded from /Users/TruePath/Build/math-site/app/models/reference.rb
Zeitwerk@rails.main: autoload set for Work, to be loaded from /Users/TruePath/Build/math-site/app/models/work.rb
Zeitwerk@rails.main: autoload set for UserListMembership, to be loaded from /Users/TruePath/Build/math-site/app/models/user_list_membership.rb
Zeitwerk@rails.main: autoload set for Claim, to be loaded from /Users/TruePath/Build/math-site/app/models/claim.rb
Zeitwerk@rails.main: autoload set for Page, to be loaded from /Users/TruePath/Build/math-site/app/models/page.rb
Zeitwerk@rails.main: autoload set for Response, to be loaded from /Users/TruePath/Build/math-site/app/models/response.rb
Zeitwerk@rails.main: autoload set for Question, to be loaded from /Users/TruePath/Build/math-site/app/models/question.rb
Zeitwerk@rails.main: autoload set for Review, to be loaded from /Users/TruePath/Build/math-site/app/models/review.rb
Zeitwerk@rails.main: autoload set for Feed, to be loaded from /Users/TruePath/Build/math-site/app/models/feed.rb
Zeitwerk@rails.main: autoload set for UserList, to be loaded from /Users/TruePath/Build/math-site/app/models/user_list.rb
Zeitwerk@rails.main: autoload set for Notification, to be loaded from /Users/TruePath/Build/math-site/app/models/notification.rb
Zeitwerk@rails.main: autoload set for TagFollow, to be loaded from /Users/TruePath/Build/math-site/app/models/tag_follow.rb
Zeitwerk@rails.main: autoload set for Comment, to be loaded from /Users/TruePath/Build/math-site/app/models/comment.rb
Zeitwerk@rails.main: autoload set for Journal, to be loaded from /Users/TruePath/Build/math-site/app/models/journal.rb
Zeitwerk@rails.main: autoload set for CommentThread, to be loaded from /Users/TruePath/Build/math-site/app/models/comment_thread.rb
Zeitwerk@rails.main: autoload set for ApplicationRecord, to be loaded from /Users/TruePath/Build/math-site/app/models/application_record.rb
Zeitwerk@rails.main: autoload set for Post, to be loaded from /Users/TruePath/Build/math-site/app/models/post.rb
Zeitwerk@rails.main: autoload set for TagSynonym, to be loaded from /Users/TruePath/Build/math-site/app/models/tag_synonym.rb
Zeitwerk@rails.main: autoload set for Cite, to be loaded from /Users/TruePath/Build/math-site/app/models/cite.rb
Zeitwerk@rails.main: autoload set for User, to be loaded from /Users/TruePath/Build/math-site/app/models/user.rb
Zeitwerk@rails.main: autoload set for ArchivableHelpers, to be loaded from /Users/TruePath/Build/math-site/app/models/concerns/archivable_helpers.rb
Zeitwerk@rails.main: autoload set for TopicHelpers, to be loaded from /Users/TruePath/Build/math-site/app/models/concerns/topic_helpers.rb
Zeitwerk@rails.main: autoload set for PostableHelpers, to be loaded from /Users/TruePath/Build/math-site/app/models/concerns/postable_helpers.rb
Zeitwerk@rails.main: autoload set for NotificationHelpers, to be loaded from /Users/TruePath/Build/math-site/app/models/concerns/notification_helpers.rb
Zeitwerk@rails.main: autoload set for AttachmentHelpers, to be loaded from /Users/TruePath/Build/math-site/app/models/concerns/attachment_helpers.rb
Zeitwerk@rails.main: autoload set for TaggableHelpers, to be loaded from /Users/TruePath/Build/math-site/app/models/concerns/taggable_helpers.rb
Zeitwerk@rails.main: autoload set for ReferenceableHelpers, to be loaded from /Users/TruePath/Build/math-site/app/models/concerns/referenceable_helpers.rb
Zeitwerk@rails.main: autoload set for AutocompleteHelpers, to be loaded from /Users/TruePath/Build/math-site/app/models/concerns/autocomplete_helpers.rb
Zeitwerk@rails.main: autoload set for AlertHelpers, to be loaded from /Users/TruePath/Build/math-site/app/models/concerns/alert_helpers.rb
Zeitwerk@rails.main: autoload set for StreamableHelpers, to be loaded from /Users/TruePath/Build/math-site/app/models/concerns/streamable_helpers.rb
Zeitwerk@rails.main: autoload set for VotableHelpers, to be loaded from /Users/TruePath/Build/math-site/app/models/concerns/votable_helpers.rb
Zeitwerk@rails.main: autoload set for JsonHelpers, to be loaded from /Users/TruePath/Build/math-site/app/models/concerns/json_helpers.rb
Zeitwerk@rails.main: autoload set for FullTextSearchHelpers, to be loaded from /Users/TruePath/Build/math-site/app/models/concerns/full_text_search_helpers.rb
Zeitwerk@rails.main: autoload set for SlugHelpers, to be loaded from /Users/TruePath/Build/math-site/app/models/concerns/slug_helpers.rb
Zeitwerk@rails.main: autoload set for JournalPolicy, to be loaded from /Users/TruePath/Build/math-site/app/policies/journal_policy.rb
Zeitwerk@rails.main: autoload set for PageChangePolicy, to be loaded from /Users/TruePath/Build/math-site/app/policies/page_change_policy.rb
Zeitwerk@rails.main: autoload set for CommentThreadPolicy, to be loaded from /Users/TruePath/Build/math-site/app/policies/comment_thread_policy.rb
Zeitwerk@rails.main: autoload set for ReferencePolicy, to be loaded from /Users/TruePath/Build/math-site/app/policies/reference_policy.rb
Zeitwerk@rails.main: autoload set for ApplicationPolicy, to be loaded from /Users/TruePath/Build/math-site/app/policies/application_policy.rb
Zeitwerk@rails.main: autoload set for UserPolicy, to be loaded from /Users/TruePath/Build/math-site/app/policies/user_policy.rb
Zeitwerk@rails.main: autoload set for ArticlePolicy, to be loaded from /Users/TruePath/Build/math-site/app/policies/article_policy.rb
Zeitwerk@rails.main: autoload set for UserListPolicy, to be loaded from /Users/TruePath/Build/math-site/app/policies/user_list_policy.rb
Zeitwerk@rails.main: autoload set for TagFollowPolicy, to be loaded from /Users/TruePath/Build/math-site/app/policies/tag_follow_policy.rb
Zeitwerk@rails.main: autoload set for QuestionPolicy, to be loaded from /Users/TruePath/Build/math-site/app/policies/question_policy.rb
Zeitwerk@rails.main: autoload set for CitePolicy, to be loaded from /Users/TruePath/Build/math-site/app/policies/cite_policy.rb
Zeitwerk@rails.main: autoload set for WorkPolicy, to be loaded from /Users/TruePath/Build/math-site/app/policies/work_policy.rb
Zeitwerk@rails.main: autoload set for PagePolicy, to be loaded from /Users/TruePath/Build/math-site/app/policies/page_policy.rb
Zeitwerk@rails.main: autoload set for CommentPolicy, to be loaded from /Users/TruePath/Build/math-site/app/policies/comment_policy.rb
Zeitwerk@rails.main: autoload set for PublicationPolicy, to be loaded from /Users/TruePath/Build/math-site/app/policies/publication_policy.rb
Zeitwerk@rails.main: autoload set for FeedPolicy, to be loaded from /Users/TruePath/Build/math-site/app/policies/feed_policy.rb
Zeitwerk@rails.main: autoload set for PostPolicy, to be loaded from /Users/TruePath/Build/math-site/app/policies/post_policy.rb
Zeitwerk@rails.main: autoload set for ResponsePolicy, to be loaded from /Users/TruePath/Build/math-site/app/policies/response_policy.rb
Zeitwerk@rails.main: autoload set for ReviewPolicy, to be loaded from /Users/TruePath/Build/math-site/app/policies/review_policy.rb
Zeitwerk@rails.main: autoload set for NotificationPolicy, to be loaded from /Users/TruePath/Build/math-site/app/policies/notification_policy.rb
Zeitwerk@rails.main: autoload set for AlertPolicy, to be loaded from /Users/TruePath/Build/math-site/app/policies/alert_policy.rb
Zeitwerk@rails.main: autoload set for TagPolicy, to be loaded from /Users/TruePath/Build/math-site/app/policies/tag_policy.rb
Zeitwerk@rails.main: autoload set for ClaimPolicy, to be loaded from /Users/TruePath/Build/math-site/app/policies/claim_policy.rb
Zeitwerk@rails.main: autoload set for StreamPolicy, to be loaded from /Users/TruePath/Build/math-site/app/policies/concerns/stream_policy.rb
Zeitwerk@rails.main: autoload set for FulltextSearchPolicy, to be loaded from /Users/TruePath/Build/math-site/app/policies/concerns/fulltext_search_policy.rb
Zeitwerk@rails.main: autoload set for VotablePolicy, to be loaded from /Users/TruePath/Build/math-site/app/policies/concerns/votable_policy.rb
Zeitwerk@rails.main: autoload set for TaggablePolicy, to be loaded from /Users/TruePath/Build/math-site/app/policies/concerns/taggable_policy.rb
Zeitwerk@rails.main: autoload set for PostablePolicy, to be loaded from /Users/TruePath/Build/math-site/app/policies/concerns/postable_policy.rb
Zeitwerk@rails.main: autoload set for AdminScrubber, to be loaded from /Users/TruePath/Build/math-site/app/scrubbers/admin_scrubber.rb
Zeitwerk@rails.main: autoload set for CommentScrubber, to be loaded from /Users/TruePath/Build/math-site/app/scrubbers/comment_scrubber.rb
Zeitwerk@rails.main: autoload set for DefaultScrubber, to be loaded from /Users/TruePath/Build/math-site/app/scrubbers/default_scrubber.rb
Zeitwerk@rails.main: autoload set for PostableScrubber, to be loaded from /Users/TruePath/Build/math-site/app/scrubbers/postable_scrubber.rb
Zeitwerk@rails.main: autoload set for TitleScrubber, to be loaded from /Users/TruePath/Build/math-site/app/scrubbers/title_scrubber.rb
Zeitwerk@rails.main: autoload set for SqlHelper, to be loaded from /Users/TruePath/Build/math-site/app/sql_helpers/sql_helper.rb

Thanks so much for you time!

Here’s the rest of the failing run

Zeitwerk@rails.main: the namespace Devise already exists, descending into /opt/local/lib/ruby3.1/gems/3.1.0/gems/devise-4.8.1/app/controllers/devise
Zeitwerk@rails.main: autoload set for Devise::OmniauthCallbacksController, to be loaded from /opt/local/lib/ruby3.1/gems/3.1.0/gems/devise-4.8.1/app/controllers/devise/omniauth_callbacks_controller.rb
Zeitwerk@rails.main: autoload set for Devise::PasswordsController, to be loaded from /opt/local/lib/ruby3.1/gems/3.1.0/gems/devise-4.8.1/app/controllers/devise/passwords_controller.rb
Zeitwerk@rails.main: autoload set for Devise::SessionsController, to be loaded from /opt/local/lib/ruby3.1/gems/3.1.0/gems/devise-4.8.1/app/controllers/devise/sessions_controller.rb
Zeitwerk@rails.main: autoload set for Devise::UnlocksController, to be loaded from /opt/local/lib/ruby3.1/gems/3.1.0/gems/devise-4.8.1/app/controllers/devise/unlocks_controller.rb
Zeitwerk@rails.main: autoload set for Devise::ConfirmationsController, to be loaded from /opt/local/lib/ruby3.1/gems/3.1.0/gems/devise-4.8.1/app/controllers/devise/confirmations_controller.rb
Zeitwerk@rails.main: autoload set for Devise::RegistrationsController, to be loaded from /opt/local/lib/ruby3.1/gems/3.1.0/gems/devise-4.8.1/app/controllers/devise/registrations_controller.rb
Zeitwerk@rails.main: autoload set for DeviseController, to be loaded from /opt/local/lib/ruby3.1/gems/3.1.0/gems/devise-4.8.1/app/controllers/devise_controller.rb
Zeitwerk@rails.main: autoload set for DeviseHelper, to be loaded from /opt/local/lib/ruby3.1/gems/3.1.0/gems/devise-4.8.1/app/helpers/devise_helper.rb
Zeitwerk@rails.main: the namespace Devise already exists, descending into /opt/local/lib/ruby3.1/gems/3.1.0/gems/devise-4.8.1/app/mailers/devise
Zeitwerk@rails.main: autoload set for Devise::Mailer, to be loaded from /opt/local/lib/ruby3.1/gems/3.1.0/gems/devise-4.8.1/app/mailers/devise/mailer.rb
Zeitwerk@rails.main: the namespace ActionMailbox already exists, descending into /opt/local/lib/ruby3.1/gems/3.1.0/gems/actionmailbox-6.1.5/app/controllers/action_mailbox
Zeitwerk@rails.main: autoload set for ActionMailbox::BaseController, to be loaded from /opt/local/lib/ruby3.1/gems/3.1.0/gems/actionmailbox-6.1.5/app/controllers/action_mailbox/base_controller.rb
Zeitwerk@rails.main: autoload set for ActionMailbox::Ingresses, to be autovivified from /opt/local/lib/ruby3.1/gems/3.1.0/gems/actionmailbox-6.1.5/app/controllers/action_mailbox/ingresses
Zeitwerk@rails.main: the namespace Rails already exists, descending into /opt/local/lib/ruby3.1/gems/3.1.0/gems/actionmailbox-6.1.5/app/controllers/rails
Zeitwerk@rails.main: autoload set for Rails::Conductor, to be autovivified from /opt/local/lib/ruby3.1/gems/3.1.0/gems/actionmailbox-6.1.5/app/controllers/rails/conductor
Zeitwerk@rails.main: the namespace ActionMailbox already exists, descending into /opt/local/lib/ruby3.1/gems/3.1.0/gems/actionmailbox-6.1.5/app/jobs/action_mailbox
Zeitwerk@rails.main: autoload set for ActionMailbox::IncinerationJob, to be loaded from /opt/local/lib/ruby3.1/gems/3.1.0/gems/actionmailbox-6.1.5/app/jobs/action_mailbox/incineration_job.rb
Zeitwerk@rails.main: autoload set for ActionMailbox::RoutingJob, to be loaded from /opt/local/lib/ruby3.1/gems/3.1.0/gems/actionmailbox-6.1.5/app/jobs/action_mailbox/routing_job.rb
Zeitwerk@rails.main: the namespace ActionMailbox already exists, descending into /opt/local/lib/ruby3.1/gems/3.1.0/gems/actionmailbox-6.1.5/app/models/action_mailbox
Zeitwerk@rails.main: autoload set for ActionMailbox::InboundEmail, to be loaded from /opt/local/lib/ruby3.1/gems/3.1.0/gems/actionmailbox-6.1.5/app/models/action_mailbox/inbound_email.rb
Zeitwerk@rails.main: autoload set for ActionMailbox::Record, to be loaded from /opt/local/lib/ruby3.1/gems/3.1.0/gems/actionmailbox-6.1.5/app/models/action_mailbox/record.rb
Zeitwerk@rails.main: the namespace ActiveStorage already exists, descending into /opt/local/lib/ruby3.1/gems/3.1.0/gems/activestorage-6.1.5/app/controllers/active_storage
Zeitwerk@rails.main: autoload set for ActiveStorage::DirectUploadsController, to be loaded from /opt/local/lib/ruby3.1/gems/3.1.0/gems/activestorage-6.1.5/app/controllers/active_storage/direct_uploads_controller.rb
Zeitwerk@rails.main: autoload set for ActiveStorage::Representations, to be autovivified from /opt/local/lib/ruby3.1/gems/3.1.0/gems/activestorage-6.1.5/app/controllers/active_storage/representations
Zeitwerk@rails.main: autoload set for ActiveStorage::BaseController, to be loaded from /opt/local/lib/ruby3.1/gems/3.1.0/gems/activestorage-6.1.5/app/controllers/active_storage/base_controller.rb
Zeitwerk@rails.main: autoload set for ActiveStorage::Blobs, to be autovivified from /opt/local/lib/ruby3.1/gems/3.1.0/gems/activestorage-6.1.5/app/controllers/active_storage/blobs
Zeitwerk@rails.main: autoload set for ActiveStorage::DiskController, to be loaded from /opt/local/lib/ruby3.1/gems/3.1.0/gems/activestorage-6.1.5/app/controllers/active_storage/disk_controller.rb
Zeitwerk@rails.main: the namespace ActiveStorage already exists, descending into /opt/local/lib/ruby3.1/gems/3.1.0/gems/activestorage-6.1.5/app/controllers/concerns/active_storage
Zeitwerk@rails.main: autoload set for ActiveStorage::FileServer, to be loaded from /opt/local/lib/ruby3.1/gems/3.1.0/gems/activestorage-6.1.5/app/controllers/concerns/active_storage/file_server.rb
Zeitwerk@rails.main: autoload set for ActiveStorage::SetCurrent, to be loaded from /opt/local/lib/ruby3.1/gems/3.1.0/gems/activestorage-6.1.5/app/controllers/concerns/active_storage/set_current.rb
Zeitwerk@rails.main: autoload set for ActiveStorage::SetHeaders, to be loaded from /opt/local/lib/ruby3.1/gems/3.1.0/gems/activestorage-6.1.5/app/controllers/concerns/active_storage/set_headers.rb
Zeitwerk@rails.main: autoload set for ActiveStorage::SetBlob, to be loaded from /opt/local/lib/ruby3.1/gems/3.1.0/gems/activestorage-6.1.5/app/controllers/concerns/active_storage/set_blob.rb
Zeitwerk@rails.main: the namespace ActiveStorage already exists, descending into /opt/local/lib/ruby3.1/gems/3.1.0/gems/activestorage-6.1.5/app/jobs/active_storage
Zeitwerk@rails.main: autoload set for ActiveStorage::BaseJob, to be loaded from /opt/local/lib/ruby3.1/gems/3.1.0/gems/activestorage-6.1.5/app/jobs/active_storage/base_job.rb
Zeitwerk@rails.main: autoload set for ActiveStorage::AnalyzeJob, to be loaded from /opt/local/lib/ruby3.1/gems/3.1.0/gems/activestorage-6.1.5/app/jobs/active_storage/analyze_job.rb
Zeitwerk@rails.main: autoload set for ActiveStorage::MirrorJob, to be loaded from /opt/local/lib/ruby3.1/gems/3.1.0/gems/activestorage-6.1.5/app/jobs/active_storage/mirror_job.rb
Zeitwerk@rails.main: autoload set for ActiveStorage::PurgeJob, to be loaded from /opt/local/lib/ruby3.1/gems/3.1.0/gems/activestorage-6.1.5/app/jobs/active_storage/purge_job.rb
Zeitwerk@rails.main: the namespace ActiveStorage already exists, descending into /opt/local/lib/ruby3.1/gems/3.1.0/gems/activestorage-6.1.5/app/models/active_storage
Zeitwerk@rails.main: autoload set for ActiveStorage::Variant, to be loaded from /opt/local/lib/ruby3.1/gems/3.1.0/gems/activestorage-6.1.5/app/models/active_storage/variant.rb
Zeitwerk@rails.main: autoload set for ActiveStorage::Blob, to be loaded from /opt/local/lib/ruby3.1/gems/3.1.0/gems/activestorage-6.1.5/app/models/active_storage/blob.rb
Zeitwerk@rails.main: autoload set for ActiveStorage::VariantWithRecord, to be loaded from /opt/local/lib/ruby3.1/gems/3.1.0/gems/activestorage-6.1.5/app/models/active_storage/variant_with_record.rb
Zeitwerk@rails.main: autoload set for ActiveStorage::Filename, to be loaded from /opt/local/lib/ruby3.1/gems/3.1.0/gems/activestorage-6.1.5/app/models/active_storage/filename.rb
Zeitwerk@rails.main: autoload set for ActiveStorage::VariantRecord, to be loaded from /opt/local/lib/ruby3.1/gems/3.1.0/gems/activestorage-6.1.5/app/models/active_storage/variant_record.rb
Zeitwerk@rails.main: autoload set for ActiveStorage::Variation, to be loaded from /opt/local/lib/ruby3.1/gems/3.1.0/gems/activestorage-6.1.5/app/models/active_storage/variation.rb
Zeitwerk@rails.main: autoload set for ActiveStorage::Record, to be loaded from /opt/local/lib/ruby3.1/gems/3.1.0/gems/activestorage-6.1.5/app/models/active_storage/record.rb
Zeitwerk@rails.main: autoload set for ActiveStorage::Attachment, to be loaded from /opt/local/lib/ruby3.1/gems/3.1.0/gems/activestorage-6.1.5/app/models/active_storage/attachment.rb
Zeitwerk@rails.main: autoload set for ActiveStorage::Current, to be loaded from /opt/local/lib/ruby3.1/gems/3.1.0/gems/activestorage-6.1.5/app/models/active_storage/current.rb
Zeitwerk@rails.main: autoload set for ActiveStorage::Preview, to be loaded from /opt/local/lib/ruby3.1/gems/3.1.0/gems/activestorage-6.1.5/app/models/active_storage/preview.rb
Zeitwerk@rails.main: constant ApplicationRecord loaded from file /Users/TruePath/Build/math-site/app/models/application_record.rb
Zeitwerk@rails.main: constant AttachmentHelpers loaded from file /Users/TruePath/Build/math-site/app/models/concerns/attachment_helpers.rb
Zeitwerk@rails.main: constant JsonHelpers loaded from file /Users/TruePath/Build/math-site/app/models/concerns/json_helpers.rb
Zeitwerk@rails.main: constant AutocompleteHelpers loaded from file /Users/TruePath/Build/math-site/app/models/concerns/autocomplete_helpers.rb
Zeitwerk@rails.main: constant SqlHelper loaded from file /Users/TruePath/Build/math-site/app/sql_helpers/sql_helper.rb
Zeitwerk@rails.main: constant ArchivableHelpers loaded from file /Users/TruePath/Build/math-site/app/models/concerns/archivable_helpers.rb
Zeitwerk@rails.main: constant StreamableHelpers loaded from file /Users/TruePath/Build/math-site/app/models/concerns/streamable_helpers.rb
Zeitwerk@rails.main: constant User loaded from file /Users/TruePath/Build/math-site/app/models/user.rb
Zeitwerk@rails.main: constant ActiveStorage::Record loaded from file /opt/local/lib/ruby3.1/gems/3.1.0/gems/activestorage-6.1.5/app/models/active_storage/record.rb
Zeitwerk@rails.main: constant ActiveStorage::Attachment loaded from file /opt/local/lib/ruby3.1/gems/3.1.0/gems/activestorage-6.1.5/app/models/active_storage/attachment.rb
Zeitwerk@rails.main: autoload set for ActiveStorage::Blob::Identifiable, to be loaded from /opt/local/lib/ruby3.1/gems/3.1.0/gems/activestorage-6.1.5/app/models/active_storage/blob/identifiable.rb
Zeitwerk@rails.main: autoload set for ActiveStorage::Blob::Analyzable, to be loaded from /opt/local/lib/ruby3.1/gems/3.1.0/gems/activestorage-6.1.5/app/models/active_storage/blob/analyzable.rb
Zeitwerk@rails.main: autoload set for ActiveStorage::Blob::Representable, to be loaded from /opt/local/lib/ruby3.1/gems/3.1.0/gems/activestorage-6.1.5/app/models/active_storage/blob/representable.rb
Zeitwerk@rails.main: constant ActiveStorage::Blob::Analyzable loaded from file /opt/local/lib/ruby3.1/gems/3.1.0/gems/activestorage-6.1.5/app/models/active_storage/blob/analyzable.rb
Zeitwerk@rails.main: constant ActiveStorage::Blob::Identifiable loaded from file /opt/local/lib/ruby3.1/gems/3.1.0/gems/activestorage-6.1.5/app/models/active_storage/blob/identifiable.rb
Zeitwerk@rails.main: constant ActiveStorage::Blob::Representable loaded from file /opt/local/lib/ruby3.1/gems/3.1.0/gems/activestorage-6.1.5/app/models/active_storage/blob/representable.rb
Zeitwerk@rails.main: constant ActiveStorage::Blob loaded from file /opt/local/lib/ruby3.1/gems/3.1.0/gems/activestorage-6.1.5/app/models/active_storage/blob.rb
Admin user already exists
Zeitwerk@rails.main: constant TaggableHelpers loaded from file /Users/TruePath/Build/math-site/app/models/concerns/taggable_helpers.rb
Zeitwerk@rails.main: constant ReferenceableHelpers loaded from file /Users/TruePath/Build/math-site/app/models/concerns/referenceable_helpers.rb
Zeitwerk@rails.main: constant FullTextSearchHelpers loaded from file /Users/TruePath/Build/math-site/app/models/concerns/full_text_search_helpers.rb
Zeitwerk@rails.main: constant NotificationHelpers loaded from file /Users/TruePath/Build/math-site/app/models/concerns/notification_helpers.rb
Zeitwerk@rails.main: constant AlertHelpers loaded from file /Users/TruePath/Build/math-site/app/models/concerns/alert_helpers.rb
Zeitwerk@rails.main: constant Page loaded from file /Users/TruePath/Build/math-site/app/models/page.rb
Creating index page
Zeitwerk@rails.main: constant PageChange loaded from file /Users/TruePath/Build/math-site/app/models/page_change.rb
Zeitwerk@rails.main: constant SlugHelpers loaded from file /Users/TruePath/Build/math-site/app/models/concerns/slug_helpers.rb
Zeitwerk@rails.main: constant TopicHelpers loaded from file /Users/TruePath/Build/math-site/app/models/concerns/topic_helpers.rb
Zeitwerk@rails.main: constant VotableHelpers loaded from file /Users/TruePath/Build/math-site/app/models/concerns/votable_helpers.rb
Zeitwerk@rails.main: constant Feed loaded from file /Users/TruePath/Build/math-site/app/models/feed.rb
Zeitwerk@rails.main: constant PostableHelpers loaded from file /Users/TruePath/Build/math-site/app/models/concerns/postable_helpers.rb
Zeitwerk@rails.main: constant Article loaded from file /Users/TruePath/Build/math-site/app/models/article.rb
Zeitwerk@rails.main: constant Review loaded from file /Users/TruePath/Build/math-site/app/models/review.rb
Zeitwerk@rails.main: constant Response loaded from file /Users/TruePath/Build/math-site/app/models/response.rb
rake aborted!
TypeError: superclass mismatch for class Comment
/Users/TruePath/Build/math-site/app/models/comment.rb:1:in `<main>'
/Users/TruePath/Build/math-site/app/models/question.rb:8:in `<class:Question>'
/Users/TruePath/Build/math-site/app/models/question.rb:1:in `<main>'
/Users/TruePath/Build/math-site/app/models/post.rb:18:in `<class:Post>'
/Users/TruePath/Build/math-site/app/models/post.rb:1:in `<main>'
/Users/TruePath/Build/math-site/app/models/tagging.rb:5:in `<class:Tagging>'
/Users/TruePath/Build/math-site/app/models/tagging.rb:1:in `<main>'
/Users/TruePath/Build/math-site/app/models/page.rb:208:in `update_history'
/Users/TruePath/Build/math-site/app/models/page.rb:102:in `build_by_user'
/Users/TruePath/Build/math-site/db/seeds.rb:99:in `block in <main>'
/Users/TruePath/Build/math-site/db/seeds.rb:84:in `<main>'
/opt/local/bin/ruby_executable_hooks3.1:22:in `eval'
/opt/local/bin/ruby_executable_hooks3.1:22:in `<main>'
Tasks: TOP => db:seed
(See full trace by running task with --trace)

That was fast :).

Could you please stop and disable Spring (DISABLE_SPRING=1), rerun the successful case, and share?

Sure! Now I see why it was such a short log :wink:

Zeitwerk@rails.once: the namespace ActionText already exists, descending into /opt/local/lib/ruby3.1/gems/3.1.0/gems/actiontext-6.1.5/app/helpers/action_text
Zeitwerk@rails.once: autoload set for ActionText::TagHelper, to be loaded from /opt/local/lib/ruby3.1/gems/3.1.0/gems/actiontext-6.1.5/app/helpers/action_text/tag_helper.rb
Zeitwerk@rails.once: autoload set for ActionText::ContentHelper, to be loaded from /opt/local/lib/ruby3.1/gems/3.1.0/gems/actiontext-6.1.5/app/helpers/action_text/content_helper.rb
Zeitwerk@rails.once: the namespace ActionText already exists, descending into /opt/local/lib/ruby3.1/gems/3.1.0/gems/actiontext-6.1.5/app/models/action_text
Zeitwerk@rails.once: autoload set for ActionText::RichText, to be loaded from /opt/local/lib/ruby3.1/gems/3.1.0/gems/actiontext-6.1.5/app/models/action_text/rich_text.rb
Zeitwerk@rails.once: autoload set for ActionText::Record, to be loaded from /opt/local/lib/ruby3.1/gems/3.1.0/gems/actiontext-6.1.5/app/models/action_text/record.rb
Zeitwerk@rails.main: autoload set for ApplicationCable, to be autovivified from /Users/TruePath/Build/math-site/app/channels/application_cable
Zeitwerk@rails.main: autoload set for ApplicationController, to be loaded from /Users/TruePath/Build/math-site/app/controllers/application_controller.rb
Zeitwerk@rails.main: autoload set for CitesController, to be loaded from /Users/TruePath/Build/math-site/app/controllers/cites_controller.rb
Zeitwerk@rails.main: autoload set for PublicationsController, to be loaded from /Users/TruePath/Build/math-site/app/controllers/publications_controller.rb
Zeitwerk@rails.main: autoload set for CommentsController, to be loaded from /Users/TruePath/Build/math-site/app/controllers/comments_controller.rb
Zeitwerk@rails.main: autoload set for PagesController, to be loaded from /Users/TruePath/Build/math-site/app/controllers/pages_controller.rb
Zeitwerk@rails.main: autoload set for TagsController, to be loaded from /Users/TruePath/Build/math-site/app/controllers/tags_controller.rb
Zeitwerk@rails.main: autoload set for WorksController, to be loaded from /Users/TruePath/Build/math-site/app/controllers/works_controller.rb
Zeitwerk@rails.main: autoload set for NotificationsController, to be loaded from /Users/TruePath/Build/math-site/app/controllers/notifications_controller.rb
Zeitwerk@rails.main: autoload set for FeedsController, to be loaded from /Users/TruePath/Build/math-site/app/controllers/feeds_controller.rb
Zeitwerk@rails.main: autoload set for ResponsesController, to be loaded from /Users/TruePath/Build/math-site/app/controllers/responses_controller.rb
Zeitwerk@rails.main: autoload set for ArticlesController, to be loaded from /Users/TruePath/Build/math-site/app/controllers/articles_controller.rb
Zeitwerk@rails.main: autoload set for QuestionsController, to be loaded from /Users/TruePath/Build/math-site/app/controllers/questions_controller.rb
Zeitwerk@rails.main: autoload set for PageChangesController, to be loaded from /Users/TruePath/Build/math-site/app/controllers/page_changes_controller.rb
Zeitwerk@rails.main: autoload set for UsersController, to be loaded from /Users/TruePath/Build/math-site/app/controllers/users_controller.rb
Zeitwerk@rails.main: autoload set for HomeController, to be loaded from /Users/TruePath/Build/math-site/app/controllers/home_controller.rb
Zeitwerk@rails.main: autoload set for Users, to be autovivified from /Users/TruePath/Build/math-site/app/controllers/users
Zeitwerk@rails.main: autoload set for AlertsController, to be loaded from /Users/TruePath/Build/math-site/app/controllers/alerts_controller.rb
Zeitwerk@rails.main: autoload set for ClaimsController, to be loaded from /Users/TruePath/Build/math-site/app/controllers/claims_controller.rb
Zeitwerk@rails.main: autoload set for ReviewsController, to be loaded from /Users/TruePath/Build/math-site/app/controllers/reviews_controller.rb
Zeitwerk@rails.main: autoload set for UserListsController, to be loaded from /Users/TruePath/Build/math-site/app/controllers/user_lists_controller.rb
Zeitwerk@rails.main: autoload set for PostsController, to be loaded from /Users/TruePath/Build/math-site/app/controllers/posts_controller.rb
Zeitwerk@rails.main: autoload set for CommentThreadsController, to be loaded from /Users/TruePath/Build/math-site/app/controllers/comment_threads_controller.rb
Zeitwerk@rails.main: autoload set for JournalsController, to be loaded from /Users/TruePath/Build/math-site/app/controllers/journals_controller.rb
Zeitwerk@rails.main: autoload set for JsonApiController, to be loaded from /Users/TruePath/Build/math-site/app/controllers/concerns/json_api_controller.rb
Zeitwerk@rails.main: autoload set for VotableController, to be loaded from /Users/TruePath/Build/math-site/app/controllers/concerns/votable_controller.rb
Zeitwerk@rails.main: autoload set for PostableController, to be loaded from /Users/TruePath/Build/math-site/app/controllers/concerns/postable_controller.rb
Zeitwerk@rails.main: autoload set for FulltextSearchController, to be loaded from /Users/TruePath/Build/math-site/app/controllers/concerns/fulltext_search_controller.rb
Zeitwerk@rails.main: autoload set for ValidatesController, to be loaded from /Users/TruePath/Build/math-site/app/controllers/concerns/validates_controller.rb
Zeitwerk@rails.main: autoload set for StreamController, to be loaded from /Users/TruePath/Build/math-site/app/controllers/concerns/stream_controller.rb
Zeitwerk@rails.main: autoload set for CollectionController, to be loaded from /Users/TruePath/Build/math-site/app/controllers/concerns/collection_controller.rb
Zeitwerk@rails.main: autoload set for ArchivableController, to be loaded from /Users/TruePath/Build/math-site/app/controllers/concerns/archivable_controller.rb
Zeitwerk@rails.main: autoload set for PolicyController, to be loaded from /Users/TruePath/Build/math-site/app/controllers/concerns/policy_controller.rb
Zeitwerk@rails.main: autoload set for AutocompleteController, to be loaded from /Users/TruePath/Build/math-site/app/controllers/concerns/autocomplete_controller.rb
Zeitwerk@rails.main: autoload set for ReviewsHelper, to be loaded from /Users/TruePath/Build/math-site/app/helpers/reviews_helper.rb
Zeitwerk@rails.main: autoload set for CommentsHelper, to be loaded from /Users/TruePath/Build/math-site/app/helpers/comments_helper.rb
Zeitwerk@rails.main: autoload set for CitesHelper, to be loaded from /Users/TruePath/Build/math-site/app/helpers/cites_helper.rb
Zeitwerk@rails.main: autoload set for UserListsHelper, to be loaded from /Users/TruePath/Build/math-site/app/helpers/user_lists_helper.rb
Zeitwerk@rails.main: autoload set for NotificationsHelper, to be loaded from /Users/TruePath/Build/math-site/app/helpers/notifications_helper.rb
Zeitwerk@rails.main: autoload set for ArticlesHelper, to be loaded from /Users/TruePath/Build/math-site/app/helpers/articles_helper.rb
Zeitwerk@rails.main: autoload set for JournalsHelper, to be loaded from /Users/TruePath/Build/math-site/app/helpers/journals_helper.rb
Zeitwerk@rails.main: autoload set for UsersHelper, to be loaded from /Users/TruePath/Build/math-site/app/helpers/users_helper.rb
Zeitwerk@rails.main: autoload set for PublicationsHelper, to be loaded from /Users/TruePath/Build/math-site/app/helpers/publications_helper.rb
Zeitwerk@rails.main: autoload set for FeedsHelper, to be loaded from /Users/TruePath/Build/math-site/app/helpers/feeds_helper.rb
Zeitwerk@rails.main: autoload set for ClaimsHelper, to be loaded from /Users/TruePath/Build/math-site/app/helpers/claims_helper.rb
Zeitwerk@rails.main: autoload set for ApplicationHelper, to be loaded from /Users/TruePath/Build/math-site/app/helpers/application_helper.rb
Zeitwerk@rails.main: autoload set for ApplicationJob, to be loaded from /Users/TruePath/Build/math-site/app/jobs/application_job.rb
Zeitwerk@rails.main: autoload set for ApplicationMailer, to be loaded from /Users/TruePath/Build/math-site/app/mailers/application_mailer.rb
Zeitwerk@rails.main: autoload set for EnhancedParameters, to be loaded from /Users/TruePath/Build/math-site/app/misc/enhanced_parameters.rb
Zeitwerk@rails.main: autoload set for SharedConstants, to be loaded from /Users/TruePath/Build/math-site/app/misc/shared_constants.rb
Zeitwerk@rails.main: autoload set for PubMetadataFetcher, to be loaded from /Users/TruePath/Build/math-site/app/misc/pub_metadata_fetcher.rb
Zeitwerk@rails.main: autoload set for BibtexAttribute, to be loaded from /Users/TruePath/Build/math-site/app/misc/bibtex_attribute.rb
Zeitwerk@rails.main: autoload set for CustomBibEntry, to be loaded from /Users/TruePath/Build/math-site/app/misc/custom_bib_entry.rb
Zeitwerk@rails.main: autoload set for MetadataHash, to be loaded from /Users/TruePath/Build/math-site/app/misc/metadata_hash.rb
Zeitwerk@rails.main: autoload set for PageChange, to be loaded from /Users/TruePath/Build/math-site/app/models/page_change.rb
Zeitwerk@rails.main: autoload set for Alert, to be loaded from /Users/TruePath/Build/math-site/app/models/alert.rb
Zeitwerk@rails.main: autoload set for Article, to be loaded from /Users/TruePath/Build/math-site/app/models/article.rb
Zeitwerk@rails.main: autoload set for Tag, to be loaded from /Users/TruePath/Build/math-site/app/models/tag.rb
Zeitwerk@rails.main: autoload set for Tagging, to be loaded from /Users/TruePath/Build/math-site/app/models/tagging.rb
Zeitwerk@rails.main: autoload set for Publication, to be loaded from /Users/TruePath/Build/math-site/app/models/publication.rb
Zeitwerk@rails.main: autoload set for Reference, to be loaded from /Users/TruePath/Build/math-site/app/models/reference.rb
Zeitwerk@rails.main: autoload set for Work, to be loaded from /Users/TruePath/Build/math-site/app/models/work.rb
Zeitwerk@rails.main: autoload set for UserListMembership, to be loaded from /Users/TruePath/Build/math-site/app/models/user_list_membership.rb
Zeitwerk@rails.main: autoload set for Claim, to be loaded from /Users/TruePath/Build/math-site/app/models/claim.rb
Zeitwerk@rails.main: autoload set for Page, to be loaded from /Users/TruePath/Build/math-site/app/models/page.rb
Zeitwerk@rails.main: autoload set for Response, to be loaded from /Users/TruePath/Build/math-site/app/models/response.rb
Zeitwerk@rails.main: autoload set for Question, to be loaded from /Users/TruePath/Build/math-site/app/models/question.rb
Zeitwerk@rails.main: autoload set for Review, to be loaded from /Users/TruePath/Build/math-site/app/models/review.rb
Zeitwerk@rails.main: autoload set for Feed, to be loaded from /Users/TruePath/Build/math-site/app/models/feed.rb
Zeitwerk@rails.main: autoload set for UserList, to be loaded from /Users/TruePath/Build/math-site/app/models/user_list.rb
Zeitwerk@rails.main: autoload set for Notification, to be loaded from /Users/TruePath/Build/math-site/app/models/notification.rb
Zeitwerk@rails.main: autoload set for TagFollow, to be loaded from /Users/TruePath/Build/math-site/app/models/tag_follow.rb
Zeitwerk@rails.main: autoload set for Comment, to be loaded from /Users/TruePath/Build/math-site/app/models/comment.rb
Zeitwerk@rails.main: autoload set for Journal, to be loaded from /Users/TruePath/Build/math-site/app/models/journal.rb
Zeitwerk@rails.main: autoload set for CommentThread, to be loaded from /Users/TruePath/Build/math-site/app/models/comment_thread.rb
Zeitwerk@rails.main: autoload set for ApplicationRecord, to be loaded from /Users/TruePath/Build/math-site/app/models/application_record.rb
Zeitwerk@rails.main: autoload set for Post, to be loaded from /Users/TruePath/Build/math-site/app/models/post.rb
Zeitwerk@rails.main: autoload set for TagSynonym, to be loaded from /Users/TruePath/Build/math-site/app/models/tag_synonym.rb
Zeitwerk@rails.main: autoload set for Cite, to be loaded from /Users/TruePath/Build/math-site/app/models/cite.rb
Zeitwerk@rails.main: autoload set for User, to be loaded from /Users/TruePath/Build/math-site/app/models/user.rb
Zeitwerk@rails.main: autoload set for ArchivableHelpers, to be loaded from /Users/TruePath/Build/math-site/app/models/concerns/archivable_helpers.rb
Zeitwerk@rails.main: autoload set for TopicHelpers, to be loaded from /Users/TruePath/Build/math-site/app/models/concerns/topic_helpers.rb
Zeitwerk@rails.main: autoload set for PostableHelpers, to be loaded from /Users/TruePath/Build/math-site/app/models/concerns/postable_helpers.rb
Zeitwerk@rails.main: autoload set for NotificationHelpers, to be loaded from /Users/TruePath/Build/math-site/app/models/concerns/notification_helpers.rb
Zeitwerk@rails.main: autoload set for AttachmentHelpers, to be loaded from /Users/TruePath/Build/math-site/app/models/concerns/attachment_helpers.rb
Zeitwerk@rails.main: autoload set for TaggableHelpers, to be loaded from /Users/TruePath/Build/math-site/app/models/concerns/taggable_helpers.rb
Zeitwerk@rails.main: autoload set for ReferenceableHelpers, to be loaded from /Users/TruePath/Build/math-site/app/models/concerns/referenceable_helpers.rb
Zeitwerk@rails.main: autoload set for AutocompleteHelpers, to be loaded from /Users/TruePath/Build/math-site/app/models/concerns/autocomplete_helpers.rb
Zeitwerk@rails.main: autoload set for AlertHelpers, to be loaded from /Users/TruePath/Build/math-site/app/models/concerns/alert_helpers.rb
Zeitwerk@rails.main: autoload set for StreamableHelpers, to be loaded from /Users/TruePath/Build/math-site/app/models/concerns/streamable_helpers.rb
Zeitwerk@rails.main: autoload set for VotableHelpers, to be loaded from /Users/TruePath/Build/math-site/app/models/concerns/votable_helpers.rb
Zeitwerk@rails.main: autoload set for JsonHelpers, to be loaded from /Users/TruePath/Build/math-site/app/models/concerns/json_helpers.rb
Zeitwerk@rails.main: autoload set for FullTextSearchHelpers, to be loaded from /Users/TruePath/Build/math-site/app/models/concerns/full_text_search_helpers.rb
Zeitwerk@rails.main: autoload set for SlugHelpers, to be loaded from /Users/TruePath/Build/math-site/app/models/concerns/slug_helpers.rb
Zeitwerk@rails.main: autoload set for JournalPolicy, to be loaded from /Users/TruePath/Build/math-site/app/policies/journal_policy.rb
Zeitwerk@rails.main: autoload set for PageChangePolicy, to be loaded from /Users/TruePath/Build/math-site/app/policies/page_change_policy.rb
Zeitwerk@rails.main: autoload set for CommentThreadPolicy, to be loaded from /Users/TruePath/Build/math-site/app/policies/comment_thread_policy.rb
Zeitwerk@rails.main: autoload set for ReferencePolicy, to be loaded from /Users/TruePath/Build/math-site/app/policies/reference_policy.rb
Zeitwerk@rails.main: autoload set for ApplicationPolicy, to be loaded from /Users/TruePath/Build/math-site/app/policies/application_policy.rb
Zeitwerk@rails.main: autoload set for UserPolicy, to be loaded from /Users/TruePath/Build/math-site/app/policies/user_policy.rb
Zeitwerk@rails.main: autoload set for ArticlePolicy, to be loaded from /Users/TruePath/Build/math-site/app/policies/article_policy.rb
Zeitwerk@rails.main: autoload set for UserListPolicy, to be loaded from /Users/TruePath/Build/math-site/app/policies/user_list_policy.rb
Zeitwerk@rails.main: autoload set for TagFollowPolicy, to be loaded from /Users/TruePath/Build/math-site/app/policies/tag_follow_policy.rb
Zeitwerk@rails.main: autoload set for QuestionPolicy, to be loaded from /Users/TruePath/Build/math-site/app/policies/question_policy.rb
Zeitwerk@rails.main: autoload set for CitePolicy, to be loaded from /Users/TruePath/Build/math-site/app/policies/cite_policy.rb
Zeitwerk@rails.main: autoload set for WorkPolicy, to be loaded from /Users/TruePath/Build/math-site/app/policies/work_policy.rb
Zeitwerk@rails.main: autoload set for PagePolicy, to be loaded from /Users/TruePath/Build/math-site/app/policies/page_policy.rb
Zeitwerk@rails.main: autoload set for CommentPolicy, to be loaded from /Users/TruePath/Build/math-site/app/policies/comment_policy.rb
Zeitwerk@rails.main: autoload set for PublicationPolicy, to be loaded from /Users/TruePath/Build/math-site/app/policies/publication_policy.rb
Zeitwerk@rails.main: autoload set for FeedPolicy, to be loaded from /Users/TruePath/Build/math-site/app/policies/feed_policy.rb
Zeitwerk@rails.main: autoload set for PostPolicy, to be loaded from /Users/TruePath/Build/math-site/app/policies/post_policy.rb
Zeitwerk@rails.main: autoload set for ResponsePolicy, to be loaded from /Users/TruePath/Build/math-site/app/policies/response_policy.rb
Zeitwerk@rails.main: autoload set for ReviewPolicy, to be loaded from /Users/TruePath/Build/math-site/app/policies/review_policy.rb
Zeitwerk@rails.main: autoload set for NotificationPolicy, to be loaded from /Users/TruePath/Build/math-site/app/policies/notification_policy.rb
Zeitwerk@rails.main: autoload set for AlertPolicy, to be loaded from /Users/TruePath/Build/math-site/app/policies/alert_policy.rb
Zeitwerk@rails.main: autoload set for TagPolicy, to be loaded from /Users/TruePath/Build/math-site/app/policies/tag_policy.rb
Zeitwerk@rails.main: autoload set for ClaimPolicy, to be loaded from /Users/TruePath/Build/math-site/app/policies/claim_policy.rb
Zeitwerk@rails.main: autoload set for StreamPolicy, to be loaded from /Users/TruePath/Build/math-site/app/policies/concerns/stream_policy.rb
Zeitwerk@rails.main: autoload set for FulltextSearchPolicy, to be loaded from /Users/TruePath/Build/math-site/app/policies/concerns/fulltext_search_policy.rb
Zeitwerk@rails.main: autoload set for VotablePolicy, to be loaded from /Users/TruePath/Build/math-site/app/policies/concerns/votable_policy.rb
Zeitwerk@rails.main: autoload set for TaggablePolicy, to be loaded from /Users/TruePath/Build/math-site/app/policies/concerns/taggable_policy.rb
Zeitwerk@rails.main: autoload set for PostablePolicy, to be loaded from /Users/TruePath/Build/math-site/app/policies/concerns/postable_policy.rb
Zeitwerk@rails.main: autoload set for AdminScrubber, to be loaded from /Users/TruePath/Build/math-site/app/scrubbers/admin_scrubber.rb
Zeitwerk@rails.main: autoload set for CommentScrubber, to be loaded from /Users/TruePath/Build/math-site/app/scrubbers/comment_scrubber.rb
Zeitwerk@rails.main: autoload set for DefaultScrubber, to be loaded from /Users/TruePath/Build/math-site/app/scrubbers/default_scrubber.rb
Zeitwerk@rails.main: autoload set for PostableScrubber, to be loaded from /Users/TruePath/Build/math-site/app/scrubbers/postable_scrubber.rb
Zeitwerk@rails.main: autoload set for TitleScrubber, to be loaded from /Users/TruePath/Build/math-site/app/scrubbers/title_scrubber.rb
Zeitwerk@rails.main: autoload set for SqlHelper, to be loaded from /Users/TruePath/Build/math-site/app/sql_helpers/sql_helper.rb
Zeitwerk@rails.main: the namespace Devise already exists, descending into /opt/local/lib/ruby3.1/gems/3.1.0/gems/devise-4.8.1/app/controllers/devise
Zeitwerk@rails.main: autoload set for Devise::OmniauthCallbacksController, to be loaded from /opt/local/lib/ruby3.1/gems/3.1.0/gems/devise-4.8.1/app/controllers/devise/omniauth_callbacks_controller.rb
Zeitwerk@rails.main: autoload set for Devise::PasswordsController, to be loaded from /opt/local/lib/ruby3.1/gems/3.1.0/gems/devise-4.8.1/app/controllers/devise/passwords_controller.rb
Zeitwerk@rails.main: autoload set for Devise::SessionsController, to be loaded from /opt/local/lib/ruby3.1/gems/3.1.0/gems/devise-4.8.1/app/controllers/devise/sessions_controller.rb
Zeitwerk@rails.main: autoload set for Devise::UnlocksController, to be loaded from /opt/local/lib/ruby3.1/gems/3.1.0/gems/devise-4.8.1/app/controllers/devise/unlocks_controller.rb
Zeitwerk@rails.main: autoload set for Devise::ConfirmationsController, to be loaded from /opt/local/lib/ruby3.1/gems/3.1.0/gems/devise-4.8.1/app/controllers/devise/confirmations_controller.rb
Zeitwerk@rails.main: autoload set for Devise::RegistrationsController, to be loaded from /opt/local/lib/ruby3.1/gems/3.1.0/gems/devise-4.8.1/app/controllers/devise/registrations_controller.rb
Zeitwerk@rails.main: autoload set for DeviseController, to be loaded from /opt/local/lib/ruby3.1/gems/3.1.0/gems/devise-4.8.1/app/controllers/devise_controller.rb
Zeitwerk@rails.main: autoload set for DeviseHelper, to be loaded from /opt/local/lib/ruby3.1/gems/3.1.0/gems/devise-4.8.1/app/helpers/devise_helper.rb
Zeitwerk@rails.main: the namespace Devise already exists, descending into /opt/local/lib/ruby3.1/gems/3.1.0/gems/devise-4.8.1/app/mailers/devise
Zeitwerk@rails.main: autoload set for Devise::Mailer, to be loaded from /opt/local/lib/ruby3.1/gems/3.1.0/gems/devise-4.8.1/app/mailers/devise/mailer.rb
Zeitwerk@rails.main: the namespace ActionMailbox already exists, descending into /opt/local/lib/ruby3.1/gems/3.1.0/gems/actionmailbox-6.1.5/app/controllers/action_mailbox
Zeitwerk@rails.main: autoload set for ActionMailbox::BaseController, to be loaded from /opt/local/lib/ruby3.1/gems/3.1.0/gems/actionmailbox-6.1.5/app/controllers/action_mailbox/base_controller.rb
Zeitwerk@rails.main: autoload set for ActionMailbox::Ingresses, to be autovivified from /opt/local/lib/ruby3.1/gems/3.1.0/gems/actionmailbox-6.1.5/app/controllers/action_mailbox/ingresses
Zeitwerk@rails.main: the namespace Rails already exists, descending into /opt/local/lib/ruby3.1/gems/3.1.0/gems/actionmailbox-6.1.5/app/controllers/rails
Zeitwerk@rails.main: autoload set for Rails::Conductor, to be autovivified from /opt/local/lib/ruby3.1/gems/3.1.0/gems/actionmailbox-6.1.5/app/controllers/rails/conductor
Zeitwerk@rails.main: the namespace ActionMailbox already exists, descending into /opt/local/lib/ruby3.1/gems/3.1.0/gems/actionmailbox-6.1.5/app/jobs/action_mailbox
Zeitwerk@rails.main: autoload set for ActionMailbox::IncinerationJob, to be loaded from /opt/local/lib/ruby3.1/gems/3.1.0/gems/actionmailbox-6.1.5/app/jobs/action_mailbox/incineration_job.rb
Zeitwerk@rails.main: autoload set for ActionMailbox::RoutingJob, to be loaded from /opt/local/lib/ruby3.1/gems/3.1.0/gems/actionmailbox-6.1.5/app/jobs/action_mailbox/routing_job.rb
Zeitwerk@rails.main: the namespace ActionMailbox already exists, descending into /opt/local/lib/ruby3.1/gems/3.1.0/gems/actionmailbox-6.1.5/app/models/action_mailbox
Zeitwerk@rails.main: autoload set for ActionMailbox::InboundEmail, to be loaded from /opt/local/lib/ruby3.1/gems/3.1.0/gems/actionmailbox-6.1.5/app/models/action_mailbox/inbound_email.rb
Zeitwerk@rails.main: autoload set for ActionMailbox::Record, to be loaded from /opt/local/lib/ruby3.1/gems/3.1.0/gems/actionmailbox-6.1.5/app/models/action_mailbox/record.rb
Zeitwerk@rails.main: the namespace ActiveStorage already exists, descending into /opt/local/lib/ruby3.1/gems/3.1.0/gems/activestorage-6.1.5/app/controllers/active_storage
Zeitwerk@rails.main: autoload set for ActiveStorage::DirectUploadsController, to be loaded from /opt/local/lib/ruby3.1/gems/3.1.0/gems/activestorage-6.1.5/app/controllers/active_storage/direct_uploads_controller.rb
Zeitwerk@rails.main: autoload set for ActiveStorage::Representations, to be autovivified from /opt/local/lib/ruby3.1/gems/3.1.0/gems/activestorage-6.1.5/app/controllers/active_storage/representations
Zeitwerk@rails.main: autoload set for ActiveStorage::BaseController, to be loaded from /opt/local/lib/ruby3.1/gems/3.1.0/gems/activestorage-6.1.5/app/controllers/active_storage/base_controller.rb
Zeitwerk@rails.main: autoload set for ActiveStorage::Blobs, to be autovivified from /opt/local/lib/ruby3.1/gems/3.1.0/gems/activestorage-6.1.5/app/controllers/active_storage/blobs
Zeitwerk@rails.main: autoload set for ActiveStorage::DiskController, to be loaded from /opt/local/lib/ruby3.1/gems/3.1.0/gems/activestorage-6.1.5/app/controllers/active_storage/disk_controller.rb
Zeitwerk@rails.main: the namespace ActiveStorage already exists, descending into /opt/local/lib/ruby3.1/gems/3.1.0/gems/activestorage-6.1.5/app/controllers/concerns/active_storage
Zeitwerk@rails.main: autoload set for ActiveStorage::FileServer, to be loaded from /opt/local/lib/ruby3.1/gems/3.1.0/gems/activestorage-6.1.5/app/controllers/concerns/active_storage/file_server.rb
Zeitwerk@rails.main: autoload set for ActiveStorage::SetCurrent, to be loaded from /opt/local/lib/ruby3.1/gems/3.1.0/gems/activestorage-6.1.5/app/controllers/concerns/active_storage/set_current.rb
Zeitwerk@rails.main: autoload set for ActiveStorage::SetHeaders, to be loaded from /opt/local/lib/ruby3.1/gems/3.1.0/gems/activestorage-6.1.5/app/controllers/concerns/active_storage/set_headers.rb
Zeitwerk@rails.main: autoload set for ActiveStorage::SetBlob, to be loaded from /opt/local/lib/ruby3.1/gems/3.1.0/gems/activestorage-6.1.5/app/controllers/concerns/active_storage/set_blob.rb
Zeitwerk@rails.main: the namespace ActiveStorage already exists, descending into /opt/local/lib/ruby3.1/gems/3.1.0/gems/activestorage-6.1.5/app/jobs/active_storage
Zeitwerk@rails.main: autoload set for ActiveStorage::BaseJob, to be loaded from /opt/local/lib/ruby3.1/gems/3.1.0/gems/activestorage-6.1.5/app/jobs/active_storage/base_job.rb
Zeitwerk@rails.main: autoload set for ActiveStorage::AnalyzeJob, to be loaded from /opt/local/lib/ruby3.1/gems/3.1.0/gems/activestorage-6.1.5/app/jobs/active_storage/analyze_job.rb
Zeitwerk@rails.main: autoload set for ActiveStorage::MirrorJob, to be loaded from /opt/local/lib/ruby3.1/gems/3.1.0/gems/activestorage-6.1.5/app/jobs/active_storage/mirror_job.rb
Zeitwerk@rails.main: autoload set for ActiveStorage::PurgeJob, to be loaded from /opt/local/lib/ruby3.1/gems/3.1.0/gems/activestorage-6.1.5/app/jobs/active_storage/purge_job.rb
Zeitwerk@rails.main: the namespace ActiveStorage already exists, descending into /opt/local/lib/ruby3.1/gems/3.1.0/gems/activestorage-6.1.5/app/models/active_storage
Zeitwerk@rails.main: autoload set for ActiveStorage::Variant, to be loaded from /opt/local/lib/ruby3.1/gems/3.1.0/gems/activestorage-6.1.5/app/models/active_storage/variant.rb
Zeitwerk@rails.main: autoload set for ActiveStorage::Blob, to be loaded from /opt/local/lib/ruby3.1/gems/3.1.0/gems/activestorage-6.1.5/app/models/active_storage/blob.rb
Zeitwerk@rails.main: autoload set for ActiveStorage::VariantWithRecord, to be loaded from /opt/local/lib/ruby3.1/gems/3.1.0/gems/activestorage-6.1.5/app/models/active_storage/variant_with_record.rb
Zeitwerk@rails.main: autoload set for ActiveStorage::Filename, to be loaded from /opt/local/lib/ruby3.1/gems/3.1.0/gems/activestorage-6.1.5/app/models/active_storage/filename.rb
Zeitwerk@rails.main: autoload set for ActiveStorage::VariantRecord, to be loaded from /opt/local/lib/ruby3.1/gems/3.1.0/gems/activestorage-6.1.5/app/models/active_storage/variant_record.rb
Zeitwerk@rails.main: autoload set for ActiveStorage::Variation, to be loaded from /opt/local/lib/ruby3.1/gems/3.1.0/gems/activestorage-6.1.5/app/models/active_storage/variation.rb
Zeitwerk@rails.main: autoload set for ActiveStorage::Record, to be loaded from /opt/local/lib/ruby3.1/gems/3.1.0/gems/activestorage-6.1.5/app/models/active_storage/record.rb
Zeitwerk@rails.main: autoload set for ActiveStorage::Attachment, to be loaded from /opt/local/lib/ruby3.1/gems/3.1.0/gems/activestorage-6.1.5/app/models/active_storage/attachment.rb
Zeitwerk@rails.main: autoload set for ActiveStorage::Current, to be loaded from /opt/local/lib/ruby3.1/gems/3.1.0/gems/activestorage-6.1.5/app/models/active_storage/current.rb
Zeitwerk@rails.main: autoload set for ActiveStorage::Preview, to be loaded from /opt/local/lib/ruby3.1/gems/3.1.0/gems/activestorage-6.1.5/app/models/active_storage/preview.rb
Zeitwerk@rails.main: constant ApplicationRecord loaded from file /Users/TruePath/Build/math-site/app/models/application_record.rb
Zeitwerk@rails.main: constant AttachmentHelpers loaded from file /Users/TruePath/Build/math-site/app/models/concerns/attachment_helpers.rb
Zeitwerk@rails.main: constant JsonHelpers loaded from file /Users/TruePath/Build/math-site/app/models/concerns/json_helpers.rb
Zeitwerk@rails.main: constant AutocompleteHelpers loaded from file /Users/TruePath/Build/math-site/app/models/concerns/autocomplete_helpers.rb
Zeitwerk@rails.main: constant SqlHelper loaded from file /Users/TruePath/Build/math-site/app/sql_helpers/sql_helper.rb
Zeitwerk@rails.main: constant ArchivableHelpers loaded from file /Users/TruePath/Build/math-site/app/models/concerns/archivable_helpers.rb
Zeitwerk@rails.main: constant StreamableHelpers loaded from file /Users/TruePath/Build/math-site/app/models/concerns/streamable_helpers.rb
Zeitwerk@rails.main: constant User loaded from file /Users/TruePath/Build/math-site/app/models/user.rb
Zeitwerk@rails.main: constant VotableHelpers loaded from file /Users/TruePath/Build/math-site/app/models/concerns/votable_helpers.rb
Zeitwerk@rails.main: constant NotificationHelpers loaded from file /Users/TruePath/Build/math-site/app/models/concerns/notification_helpers.rb
Zeitwerk@rails.main: constant AlertHelpers loaded from file /Users/TruePath/Build/math-site/app/models/concerns/alert_helpers.rb
Zeitwerk@rails.main: constant Comment loaded from file /Users/TruePath/Build/math-site/app/models/comment.rb

Alright, now let’s throw

p Object.const_source_location(:Comment)

at the top of app/models/comment.rb, trigger the error, and see what it prints.

Ok, I added it at the very top. I’m guessing the line you wanted is ["/opt/local/lib/ruby3.1/gems/3.1.0/gems/zeitwerk-2.5.4/lib/zeitwerk/loader.rb", 434] but I wasn’t sure.

To not hit the reply limit I cut out the initial lines that’s are just loading the Controllers , ActionText and ApplicationCable after checking it was the same as the previous run.

Zeitwerk@rails.main: autoload set for ReviewsHelper, to be loaded from /Users/TruePath/Build/math-site/app/helpers/reviews_helper.rb
Zeitwerk@rails.main: autoload set for CommentsHelper, to be loaded from /Users/TruePath/Build/math-site/app/helpers/comments_helper.rb
Zeitwerk@rails.main: autoload set for CitesHelper, to be loaded from /Users/TruePath/Build/math-site/app/helpers/cites_helper.rb
Zeitwerk@rails.main: autoload set for UserListsHelper, to be loaded from /Users/TruePath/Build/math-site/app/helpers/user_lists_helper.rb
Zeitwerk@rails.main: autoload set for NotificationsHelper, to be loaded from /Users/TruePath/Build/math-site/app/helpers/notifications_helper.rb
Zeitwerk@rails.main: autoload set for ArticlesHelper, to be loaded from /Users/TruePath/Build/math-site/app/helpers/articles_helper.rb
Zeitwerk@rails.main: autoload set for JournalsHelper, to be loaded from /Users/TruePath/Build/math-site/app/helpers/journals_helper.rb
Zeitwerk@rails.main: autoload set for UsersHelper, to be loaded from /Users/TruePath/Build/math-site/app/helpers/users_helper.rb
Zeitwerk@rails.main: autoload set for PublicationsHelper, to be loaded from /Users/TruePath/Build/math-site/app/helpers/publications_helper.rb
Zeitwerk@rails.main: autoload set for FeedsHelper, to be loaded from /Users/TruePath/Build/math-site/app/helpers/feeds_helper.rb
Zeitwerk@rails.main: autoload set for ClaimsHelper, to be loaded from /Users/TruePath/Build/math-site/app/helpers/claims_helper.rb
Zeitwerk@rails.main: autoload set for ApplicationHelper, to be loaded from /Users/TruePath/Build/math-site/app/helpers/application_helper.rb
Zeitwerk@rails.main: autoload set for ApplicationJob, to be loaded from /Users/TruePath/Build/math-site/app/jobs/application_job.rb
Zeitwerk@rails.main: autoload set for ApplicationMailer, to be loaded from /Users/TruePath/Build/math-site/app/mailers/application_mailer.rb
Zeitwerk@rails.main: autoload set for EnhancedParameters, to be loaded from /Users/TruePath/Build/math-site/app/misc/enhanced_parameters.rb
Zeitwerk@rails.main: autoload set for SharedConstants, to be loaded from /Users/TruePath/Build/math-site/app/misc/shared_constants.rb
Zeitwerk@rails.main: autoload set for PubMetadataFetcher, to be loaded from /Users/TruePath/Build/math-site/app/misc/pub_metadata_fetcher.rb
Zeitwerk@rails.main: autoload set for BibtexAttribute, to be loaded from /Users/TruePath/Build/math-site/app/misc/bibtex_attribute.rb
Zeitwerk@rails.main: autoload set for CustomBibEntry, to be loaded from /Users/TruePath/Build/math-site/app/misc/custom_bib_entry.rb
Zeitwerk@rails.main: autoload set for MetadataHash, to be loaded from /Users/TruePath/Build/math-site/app/misc/metadata_hash.rb
Zeitwerk@rails.main: autoload set for PageChange, to be loaded from /Users/TruePath/Build/math-site/app/models/page_change.rb
Zeitwerk@rails.main: autoload set for Alert, to be loaded from /Users/TruePath/Build/math-site/app/models/alert.rb
Zeitwerk@rails.main: autoload set for Article, to be loaded from /Users/TruePath/Build/math-site/app/models/article.rb
Zeitwerk@rails.main: autoload set for Tag, to be loaded from /Users/TruePath/Build/math-site/app/models/tag.rb
Zeitwerk@rails.main: autoload set for Tagging, to be loaded from /Users/TruePath/Build/math-site/app/models/tagging.rb
Zeitwerk@rails.main: autoload set for Publication, to be loaded from /Users/TruePath/Build/math-site/app/models/publication.rb
Zeitwerk@rails.main: autoload set for Reference, to be loaded from /Users/TruePath/Build/math-site/app/models/reference.rb
Zeitwerk@rails.main: autoload set for Work, to be loaded from /Users/TruePath/Build/math-site/app/models/work.rb
Zeitwerk@rails.main: autoload set for UserListMembership, to be loaded from /Users/TruePath/Build/math-site/app/models/user_list_membership.rb
Zeitwerk@rails.main: autoload set for Claim, to be loaded from /Users/TruePath/Build/math-site/app/models/claim.rb
Zeitwerk@rails.main: autoload set for Page, to be loaded from /Users/TruePath/Build/math-site/app/models/page.rb
Zeitwerk@rails.main: autoload set for Response, to be loaded from /Users/TruePath/Build/math-site/app/models/response.rb
Zeitwerk@rails.main: autoload set for Question, to be loaded from /Users/TruePath/Build/math-site/app/models/question.rb
Zeitwerk@rails.main: autoload set for Review, to be loaded from /Users/TruePath/Build/math-site/app/models/review.rb
Zeitwerk@rails.main: autoload set for Feed, to be loaded from /Users/TruePath/Build/math-site/app/models/feed.rb
Zeitwerk@rails.main: autoload set for UserList, to be loaded from /Users/TruePath/Build/math-site/app/models/user_list.rb
Zeitwerk@rails.main: autoload set for Notification, to be loaded from /Users/TruePath/Build/math-site/app/models/notification.rb
Zeitwerk@rails.main: autoload set for TagFollow, to be loaded from /Users/TruePath/Build/math-site/app/models/tag_follow.rb
Zeitwerk@rails.main: autoload set for Comment, to be loaded from /Users/TruePath/Build/math-site/app/models/comment.rb
Zeitwerk@rails.main: autoload set for Journal, to be loaded from /Users/TruePath/Build/math-site/app/models/journal.rb
Zeitwerk@rails.main: autoload set for CommentThread, to be loaded from /Users/TruePath/Build/math-site/app/models/comment_thread.rb
Zeitwerk@rails.main: autoload set for ApplicationRecord, to be loaded from /Users/TruePath/Build/math-site/app/models/application_record.rb
Zeitwerk@rails.main: autoload set for Post, to be loaded from /Users/TruePath/Build/math-site/app/models/post.rb
Zeitwerk@rails.main: autoload set for TagSynonym, to be loaded from /Users/TruePath/Build/math-site/app/models/tag_synonym.rb
Zeitwerk@rails.main: autoload set for Cite, to be loaded from /Users/TruePath/Build/math-site/app/models/cite.rb
Zeitwerk@rails.main: autoload set for User, to be loaded from /Users/TruePath/Build/math-site/app/models/user.rb
Zeitwerk@rails.main: autoload set for ArchivableHelpers, to be loaded from /Users/TruePath/Build/math-site/app/models/concerns/archivable_helpers.rb
Zeitwerk@rails.main: autoload set for TopicHelpers, to be loaded from /Users/TruePath/Build/math-site/app/models/concerns/topic_helpers.rb
Zeitwerk@rails.main: autoload set for PostableHelpers, to be loaded from /Users/TruePath/Build/math-site/app/models/concerns/postable_helpers.rb
Zeitwerk@rails.main: autoload set for NotificationHelpers, to be loaded from /Users/TruePath/Build/math-site/app/models/concerns/notification_helpers.rb
Zeitwerk@rails.main: autoload set for AttachmentHelpers, to be loaded from /Users/TruePath/Build/math-site/app/models/concerns/attachment_helpers.rb
Zeitwerk@rails.main: autoload set for TaggableHelpers, to be loaded from /Users/TruePath/Build/math-site/app/models/concerns/taggable_helpers.rb
Zeitwerk@rails.main: autoload set for ReferenceableHelpers, to be loaded from /Users/TruePath/Build/math-site/app/models/concerns/referenceable_helpers.rb
Zeitwerk@rails.main: autoload set for AutocompleteHelpers, to be loaded from /Users/TruePath/Build/math-site/app/models/concerns/autocomplete_helpers.rb
Zeitwerk@rails.main: autoload set for AlertHelpers, to be loaded from /Users/TruePath/Build/math-site/app/models/concerns/alert_helpers.rb
Zeitwerk@rails.main: autoload set for StreamableHelpers, to be loaded from /Users/TruePath/Build/math-site/app/models/concerns/streamable_helpers.rb
Zeitwerk@rails.main: autoload set for VotableHelpers, to be loaded from /Users/TruePath/Build/math-site/app/models/concerns/votable_helpers.rb
Zeitwerk@rails.main: autoload set for JsonHelpers, to be loaded from /Users/TruePath/Build/math-site/app/models/concerns/json_helpers.rb
Zeitwerk@rails.main: autoload set for FullTextSearchHelpers, to be loaded from /Users/TruePath/Build/math-site/app/models/concerns/full_text_search_helpers.rb
Zeitwerk@rails.main: autoload set for SlugHelpers, to be loaded from /Users/TruePath/Build/math-site/app/models/concerns/slug_helpers.rb
Zeitwerk@rails.main: autoload set for JournalPolicy, to be loaded from /Users/TruePath/Build/math-site/app/policies/journal_policy.rb
Zeitwerk@rails.main: autoload set for PageChangePolicy, to be loaded from /Users/TruePath/Build/math-site/app/policies/page_change_policy.rb
Zeitwerk@rails.main: autoload set for CommentThreadPolicy, to be loaded from /Users/TruePath/Build/math-site/app/policies/comment_thread_policy.rb
Zeitwerk@rails.main: autoload set for ReferencePolicy, to be loaded from /Users/TruePath/Build/math-site/app/policies/reference_policy.rb
Zeitwerk@rails.main: autoload set for ApplicationPolicy, to be loaded from /Users/TruePath/Build/math-site/app/policies/application_policy.rb
Zeitwerk@rails.main: autoload set for UserPolicy, to be loaded from /Users/TruePath/Build/math-site/app/policies/user_policy.rb
Zeitwerk@rails.main: autoload set for ArticlePolicy, to be loaded from /Users/TruePath/Build/math-site/app/policies/article_policy.rb
Zeitwerk@rails.main: autoload set for UserListPolicy, to be loaded from /Users/TruePath/Build/math-site/app/policies/user_list_policy.rb
Zeitwerk@rails.main: autoload set for TagFollowPolicy, to be loaded from /Users/TruePath/Build/math-site/app/policies/tag_follow_policy.rb
Zeitwerk@rails.main: autoload set for QuestionPolicy, to be loaded from /Users/TruePath/Build/math-site/app/policies/question_policy.rb
Zeitwerk@rails.main: autoload set for CitePolicy, to be loaded from /Users/TruePath/Build/math-site/app/policies/cite_policy.rb
Zeitwerk@rails.main: autoload set for WorkPolicy, to be loaded from /Users/TruePath/Build/math-site/app/policies/work_policy.rb
Zeitwerk@rails.main: autoload set for PagePolicy, to be loaded from /Users/TruePath/Build/math-site/app/policies/page_policy.rb
Zeitwerk@rails.main: autoload set for CommentPolicy, to be loaded from /Users/TruePath/Build/math-site/app/policies/comment_policy.rb
Zeitwerk@rails.main: autoload set for PublicationPolicy, to be loaded from /Users/TruePath/Build/math-site/app/policies/publication_policy.rb
Zeitwerk@rails.main: autoload set for FeedPolicy, to be loaded from /Users/TruePath/Build/math-site/app/policies/feed_policy.rb
Zeitwerk@rails.main: autoload set for PostPolicy, to be loaded from /Users/TruePath/Build/math-site/app/policies/post_policy.rb
Zeitwerk@rails.main: autoload set for ResponsePolicy, to be loaded from /Users/TruePath/Build/math-site/app/policies/response_policy.rb
Zeitwerk@rails.main: autoload set for ReviewPolicy, to be loaded from /Users/TruePath/Build/math-site/app/policies/review_policy.rb
Zeitwerk@rails.main: autoload set for NotificationPolicy, to be loaded from /Users/TruePath/Build/math-site/app/policies/notification_policy.rb
Zeitwerk@rails.main: autoload set for AlertPolicy, to be loaded from /Users/TruePath/Build/math-site/app/policies/alert_policy.rb
Zeitwerk@rails.main: autoload set for TagPolicy, to be loaded from /Users/TruePath/Build/math-site/app/policies/tag_policy.rb
Zeitwerk@rails.main: autoload set for ClaimPolicy, to be loaded from /Users/TruePath/Build/math-site/app/policies/claim_policy.rb
Zeitwerk@rails.main: autoload set for StreamPolicy, to be loaded from /Users/TruePath/Build/math-site/app/policies/concerns/stream_policy.rb
Zeitwerk@rails.main: autoload set for FulltextSearchPolicy, to be loaded from /Users/TruePath/Build/math-site/app/policies/concerns/fulltext_search_policy.rb
Zeitwerk@rails.main: autoload set for VotablePolicy, to be loaded from /Users/TruePath/Build/math-site/app/policies/concerns/votable_policy.rb
Zeitwerk@rails.main: autoload set for TaggablePolicy, to be loaded from /Users/TruePath/Build/math-site/app/policies/concerns/taggable_policy.rb
Zeitwerk@rails.main: autoload set for PostablePolicy, to be loaded from /Users/TruePath/Build/math-site/app/policies/concerns/postable_policy.rb
Zeitwerk@rails.main: autoload set for AdminScrubber, to be loaded from /Users/TruePath/Build/math-site/app/scrubbers/admin_scrubber.rb
Zeitwerk@rails.main: autoload set for CommentScrubber, to be loaded from /Users/TruePath/Build/math-site/app/scrubbers/comment_scrubber.rb
Zeitwerk@rails.main: autoload set for DefaultScrubber, to be loaded from /Users/TruePath/Build/math-site/app/scrubbers/default_scrubber.rb
Zeitwerk@rails.main: autoload set for PostableScrubber, to be loaded from /Users/TruePath/Build/math-site/app/scrubbers/postable_scrubber.rb
Zeitwerk@rails.main: autoload set for TitleScrubber, to be loaded from /Users/TruePath/Build/math-site/app/scrubbers/title_scrubber.rb
Zeitwerk@rails.main: autoload set for SqlHelper, to be loaded from /Users/TruePath/Build/math-site/app/sql_helpers/sql_helper.rb
Zeitwerk@rails.main: the namespace Devise already exists, descending into /opt/local/lib/ruby3.1/gems/3.1.0/gems/devise-4.8.1/app/controllers/devise
Zeitwerk@rails.main: autoload set for Devise::OmniauthCallbacksController, to be loaded from /opt/local/lib/ruby3.1/gems/3.1.0/gems/devise-4.8.1/app/controllers/devise/omniauth_callbacks_controller.rb
Zeitwerk@rails.main: autoload set for Devise::PasswordsController, to be loaded from /opt/local/lib/ruby3.1/gems/3.1.0/gems/devise-4.8.1/app/controllers/devise/passwords_controller.rb
Zeitwerk@rails.main: autoload set for Devise::SessionsController, to be loaded from /opt/local/lib/ruby3.1/gems/3.1.0/gems/devise-4.8.1/app/controllers/devise/sessions_controller.rb
Zeitwerk@rails.main: autoload set for Devise::UnlocksController, to be loaded from /opt/local/lib/ruby3.1/gems/3.1.0/gems/devise-4.8.1/app/controllers/devise/unlocks_controller.rb
Zeitwerk@rails.main: autoload set for Devise::ConfirmationsController, to be loaded from /opt/local/lib/ruby3.1/gems/3.1.0/gems/devise-4.8.1/app/controllers/devise/confirmations_controller.rb
Zeitwerk@rails.main: autoload set for Devise::RegistrationsController, to be loaded from /opt/local/lib/ruby3.1/gems/3.1.0/gems/devise-4.8.1/app/controllers/devise/registrations_controller.rb
Zeitwerk@rails.main: autoload set for DeviseController, to be loaded from /opt/local/lib/ruby3.1/gems/3.1.0/gems/devise-4.8.1/app/controllers/devise_controller.rb
Zeitwerk@rails.main: autoload set for DeviseHelper, to be loaded from /opt/local/lib/ruby3.1/gems/3.1.0/gems/devise-4.8.1/app/helpers/devise_helper.rb
Zeitwerk@rails.main: the namespace Devise already exists, descending into /opt/local/lib/ruby3.1/gems/3.1.0/gems/devise-4.8.1/app/mailers/devise
Zeitwerk@rails.main: autoload set for Devise::Mailer, to be loaded from /opt/local/lib/ruby3.1/gems/3.1.0/gems/devise-4.8.1/app/mailers/devise/mailer.rb
Zeitwerk@rails.main: the namespace ActionMailbox already exists, descending into /opt/local/lib/ruby3.1/gems/3.1.0/gems/actionmailbox-6.1.5/app/controllers/action_mailbox
Zeitwerk@rails.main: autoload set for ActionMailbox::BaseController, to be loaded from /opt/local/lib/ruby3.1/gems/3.1.0/gems/actionmailbox-6.1.5/app/controllers/action_mailbox/base_controller.rb
Zeitwerk@rails.main: autoload set for ActionMailbox::Ingresses, to be autovivified from /opt/local/lib/ruby3.1/gems/3.1.0/gems/actionmailbox-6.1.5/app/controllers/action_mailbox/ingresses
Zeitwerk@rails.main: the namespace Rails already exists, descending into /opt/local/lib/ruby3.1/gems/3.1.0/gems/actionmailbox-6.1.5/app/controllers/rails
Zeitwerk@rails.main: autoload set for Rails::Conductor, to be autovivified from /opt/local/lib/ruby3.1/gems/3.1.0/gems/actionmailbox-6.1.5/app/controllers/rails/conductor
Zeitwerk@rails.main: the namespace ActionMailbox already exists, descending into /opt/local/lib/ruby3.1/gems/3.1.0/gems/actionmailbox-6.1.5/app/jobs/action_mailbox
Zeitwerk@rails.main: autoload set for ActionMailbox::IncinerationJob, to be loaded from /opt/local/lib/ruby3.1/gems/3.1.0/gems/actionmailbox-6.1.5/app/jobs/action_mailbox/incineration_job.rb
Zeitwerk@rails.main: autoload set for ActionMailbox::RoutingJob, to be loaded from /opt/local/lib/ruby3.1/gems/3.1.0/gems/actionmailbox-6.1.5/app/jobs/action_mailbox/routing_job.rb
Zeitwerk@rails.main: the namespace ActionMailbox already exists, descending into /opt/local/lib/ruby3.1/gems/3.1.0/gems/actionmailbox-6.1.5/app/models/action_mailbox
Zeitwerk@rails.main: autoload set for ActionMailbox::InboundEmail, to be loaded from /opt/local/lib/ruby3.1/gems/3.1.0/gems/actionmailbox-6.1.5/app/models/action_mailbox/inbound_email.rb
Zeitwerk@rails.main: autoload set for ActionMailbox::Record, to be loaded from /opt/local/lib/ruby3.1/gems/3.1.0/gems/actionmailbox-6.1.5/app/models/action_mailbox/record.rb
Zeitwerk@rails.main: the namespace ActiveStorage already exists, descending into /opt/local/lib/ruby3.1/gems/3.1.0/gems/activestorage-6.1.5/app/controllers/active_storage
Zeitwerk@rails.main: autoload set for ActiveStorage::DirectUploadsController, to be loaded from /opt/local/lib/ruby3.1/gems/3.1.0/gems/activestorage-6.1.5/app/controllers/active_storage/direct_uploads_controller.rb
Zeitwerk@rails.main: autoload set for ActiveStorage::Representations, to be autovivified from /opt/local/lib/ruby3.1/gems/3.1.0/gems/activestorage-6.1.5/app/controllers/active_storage/representations
Zeitwerk@rails.main: autoload set for ActiveStorage::BaseController, to be loaded from /opt/local/lib/ruby3.1/gems/3.1.0/gems/activestorage-6.1.5/app/controllers/active_storage/base_controller.rb
Zeitwerk@rails.main: autoload set for ActiveStorage::Blobs, to be autovivified from /opt/local/lib/ruby3.1/gems/3.1.0/gems/activestorage-6.1.5/app/controllers/active_storage/blobs
Zeitwerk@rails.main: autoload set for ActiveStorage::DiskController, to be loaded from /opt/local/lib/ruby3.1/gems/3.1.0/gems/activestorage-6.1.5/app/controllers/active_storage/disk_controller.rb
Zeitwerk@rails.main: the namespace ActiveStorage already exists, descending into /opt/local/lib/ruby3.1/gems/3.1.0/gems/activestorage-6.1.5/app/controllers/concerns/active_storage
Zeitwerk@rails.main: autoload set for ActiveStorage::FileServer, to be loaded from /opt/local/lib/ruby3.1/gems/3.1.0/gems/activestorage-6.1.5/app/controllers/concerns/active_storage/file_server.rb
Zeitwerk@rails.main: autoload set for ActiveStorage::SetCurrent, to be loaded from /opt/local/lib/ruby3.1/gems/3.1.0/gems/activestorage-6.1.5/app/controllers/concerns/active_storage/set_current.rb
Zeitwerk@rails.main: autoload set for ActiveStorage::SetHeaders, to be loaded from /opt/local/lib/ruby3.1/gems/3.1.0/gems/activestorage-6.1.5/app/controllers/concerns/active_storage/set_headers.rb
Zeitwerk@rails.main: autoload set for ActiveStorage::SetBlob, to be loaded from /opt/local/lib/ruby3.1/gems/3.1.0/gems/activestorage-6.1.5/app/controllers/concerns/active_storage/set_blob.rb
Zeitwerk@rails.main: the namespace ActiveStorage already exists, descending into /opt/local/lib/ruby3.1/gems/3.1.0/gems/activestorage-6.1.5/app/jobs/active_storage
Zeitwerk@rails.main: autoload set for ActiveStorage::BaseJob, to be loaded from /opt/local/lib/ruby3.1/gems/3.1.0/gems/activestorage-6.1.5/app/jobs/active_storage/base_job.rb
Zeitwerk@rails.main: autoload set for ActiveStorage::AnalyzeJob, to be loaded from /opt/local/lib/ruby3.1/gems/3.1.0/gems/activestorage-6.1.5/app/jobs/active_storage/analyze_job.rb
Zeitwerk@rails.main: autoload set for ActiveStorage::MirrorJob, to be loaded from /opt/local/lib/ruby3.1/gems/3.1.0/gems/activestorage-6.1.5/app/jobs/active_storage/mirror_job.rb
Zeitwerk@rails.main: autoload set for ActiveStorage::PurgeJob, to be loaded from /opt/local/lib/ruby3.1/gems/3.1.0/gems/activestorage-6.1.5/app/jobs/active_storage/purge_job.rb
Zeitwerk@rails.main: the namespace ActiveStorage already exists, descending into /opt/local/lib/ruby3.1/gems/3.1.0/gems/activestorage-6.1.5/app/models/active_storage
Zeitwerk@rails.main: autoload set for ActiveStorage::Variant, to be loaded from /opt/local/lib/ruby3.1/gems/3.1.0/gems/activestorage-6.1.5/app/models/active_storage/variant.rb
Zeitwerk@rails.main: autoload set for ActiveStorage::Blob, to be loaded from /opt/local/lib/ruby3.1/gems/3.1.0/gems/activestorage-6.1.5/app/models/active_storage/blob.rb
Zeitwerk@rails.main: autoload set for ActiveStorage::VariantWithRecord, to be loaded from /opt/local/lib/ruby3.1/gems/3.1.0/gems/activestorage-6.1.5/app/models/active_storage/variant_with_record.rb
Zeitwerk@rails.main: autoload set for ActiveStorage::Filename, to be loaded from /opt/local/lib/ruby3.1/gems/3.1.0/gems/activestorage-6.1.5/app/models/active_storage/filename.rb
Zeitwerk@rails.main: autoload set for ActiveStorage::VariantRecord, to be loaded from /opt/local/lib/ruby3.1/gems/3.1.0/gems/activestorage-6.1.5/app/models/active_storage/variant_record.rb
Zeitwerk@rails.main: autoload set for ActiveStorage::Variation, to be loaded from /opt/local/lib/ruby3.1/gems/3.1.0/gems/activestorage-6.1.5/app/models/active_storage/variation.rb
Zeitwerk@rails.main: autoload set for ActiveStorage::Record, to be loaded from /opt/local/lib/ruby3.1/gems/3.1.0/gems/activestorage-6.1.5/app/models/active_storage/record.rb
Zeitwerk@rails.main: autoload set for ActiveStorage::Attachment, to be loaded from /opt/local/lib/ruby3.1/gems/3.1.0/gems/activestorage-6.1.5/app/models/active_storage/attachment.rb
Zeitwerk@rails.main: autoload set for ActiveStorage::Current, to be loaded from /opt/local/lib/ruby3.1/gems/3.1.0/gems/activestorage-6.1.5/app/models/active_storage/current.rb
Zeitwerk@rails.main: autoload set for ActiveStorage::Preview, to be loaded from /opt/local/lib/ruby3.1/gems/3.1.0/gems/activestorage-6.1.5/app/models/active_storage/preview.rb
Zeitwerk@rails.main: constant ApplicationRecord loaded from file /Users/TruePath/Build/math-site/app/models/application_record.rb
Zeitwerk@rails.main: constant AttachmentHelpers loaded from file /Users/TruePath/Build/math-site/app/models/concerns/attachment_helpers.rb
Zeitwerk@rails.main: constant JsonHelpers loaded from file /Users/TruePath/Build/math-site/app/models/concerns/json_helpers.rb
Zeitwerk@rails.main: constant AutocompleteHelpers loaded from file /Users/TruePath/Build/math-site/app/models/concerns/autocomplete_helpers.rb
Zeitwerk@rails.main: constant SqlHelper loaded from file /Users/TruePath/Build/math-site/app/sql_helpers/sql_helper.rb
Zeitwerk@rails.main: constant ArchivableHelpers loaded from file /Users/TruePath/Build/math-site/app/models/concerns/archivable_helpers.rb
Zeitwerk@rails.main: constant StreamableHelpers loaded from file /Users/TruePath/Build/math-site/app/models/concerns/streamable_helpers.rb
Zeitwerk@rails.main: constant User loaded from file /Users/TruePath/Build/math-site/app/models/user.rb
Zeitwerk@rails.main: constant ActiveStorage::Record loaded from file /opt/local/lib/ruby3.1/gems/3.1.0/gems/activestorage-6.1.5/app/models/active_storage/record.rb
Zeitwerk@rails.main: constant ActiveStorage::Attachment loaded from file /opt/local/lib/ruby3.1/gems/3.1.0/gems/activestorage-6.1.5/app/models/active_storage/attachment.rb
Zeitwerk@rails.main: autoload set for ActiveStorage::Blob::Identifiable, to be loaded from /opt/local/lib/ruby3.1/gems/3.1.0/gems/activestorage-6.1.5/app/models/active_storage/blob/identifiable.rb
Zeitwerk@rails.main: autoload set for ActiveStorage::Blob::Analyzable, to be loaded from /opt/local/lib/ruby3.1/gems/3.1.0/gems/activestorage-6.1.5/app/models/active_storage/blob/analyzable.rb
Zeitwerk@rails.main: autoload set for ActiveStorage::Blob::Representable, to be loaded from /opt/local/lib/ruby3.1/gems/3.1.0/gems/activestorage-6.1.5/app/models/active_storage/blob/representable.rb
Zeitwerk@rails.main: constant ActiveStorage::Blob::Analyzable loaded from file /opt/local/lib/ruby3.1/gems/3.1.0/gems/activestorage-6.1.5/app/models/active_storage/blob/analyzable.rb
Zeitwerk@rails.main: constant ActiveStorage::Blob::Identifiable loaded from file /opt/local/lib/ruby3.1/gems/3.1.0/gems/activestorage-6.1.5/app/models/active_storage/blob/identifiable.rb
Zeitwerk@rails.main: constant ActiveStorage::Blob::Representable loaded from file /opt/local/lib/ruby3.1/gems/3.1.0/gems/activestorage-6.1.5/app/models/active_storage/blob/representable.rb
Zeitwerk@rails.main: constant ActiveStorage::Blob loaded from file /opt/local/lib/ruby3.1/gems/3.1.0/gems/activestorage-6.1.5/app/models/active_storage/blob.rb
Admin user already exists
Zeitwerk@rails.main: constant TaggableHelpers loaded from file /Users/TruePath/Build/math-site/app/models/concerns/taggable_helpers.rb
Zeitwerk@rails.main: constant ReferenceableHelpers loaded from file /Users/TruePath/Build/math-site/app/models/concerns/referenceable_helpers.rb
Zeitwerk@rails.main: constant FullTextSearchHelpers loaded from file /Users/TruePath/Build/math-site/app/models/concerns/full_text_search_helpers.rb
Zeitwerk@rails.main: constant NotificationHelpers loaded from file /Users/TruePath/Build/math-site/app/models/concerns/notification_helpers.rb
Zeitwerk@rails.main: constant AlertHelpers loaded from file /Users/TruePath/Build/math-site/app/models/concerns/alert_helpers.rb
Zeitwerk@rails.main: constant Page loaded from file /Users/TruePath/Build/math-site/app/models/page.rb
Creating index page
Zeitwerk@rails.main: constant PageChange loaded from file /Users/TruePath/Build/math-site/app/models/page_change.rb
Zeitwerk@rails.main: constant SlugHelpers loaded from file /Users/TruePath/Build/math-site/app/models/concerns/slug_helpers.rb
Zeitwerk@rails.main: constant TopicHelpers loaded from file /Users/TruePath/Build/math-site/app/models/concerns/topic_helpers.rb
Zeitwerk@rails.main: constant VotableHelpers loaded from file /Users/TruePath/Build/math-site/app/models/concerns/votable_helpers.rb
Zeitwerk@rails.main: constant Feed loaded from file /Users/TruePath/Build/math-site/app/models/feed.rb
Zeitwerk@rails.main: constant PostableHelpers loaded from file /Users/TruePath/Build/math-site/app/models/concerns/postable_helpers.rb
Zeitwerk@rails.main: constant Article loaded from file /Users/TruePath/Build/math-site/app/models/article.rb
Zeitwerk@rails.main: constant Review loaded from file /Users/TruePath/Build/math-site/app/models/review.rb
Zeitwerk@rails.main: constant Response loaded from file /Users/TruePath/Build/math-site/app/models/response.rb
["/opt/local/lib/ruby3.1/gems/3.1.0/gems/zeitwerk-2.5.4/lib/zeitwerk/loader.rb", 434]
rake aborted!
TypeError: superclass mismatch for class Comment
/Users/TruePath/Build/math-site/app/models/comment.rb:3:in `<main>'
/Users/TruePath/Build/math-site/app/models/question.rb:8:in `<class:Question>'
/Users/TruePath/Build/math-site/app/models/question.rb:1:in `<main>'
/Users/TruePath/Build/math-site/app/models/post.rb:18:in `<class:Post>'
/Users/TruePath/Build/math-site/app/models/post.rb:1:in `<main>'
/Users/TruePath/Build/math-site/app/models/tagging.rb:5:in `<class:Tagging>'
/Users/TruePath/Build/math-site/app/models/tagging.rb:1:in `<main>'
/Users/TruePath/Build/math-site/app/models/page.rb:208:in `update_history'
/Users/TruePath/Build/math-site/app/models/page.rb:102:in `build_by_user'
/Users/TruePath/Build/math-site/db/seeds.rb:99:in `block in <main>'
/Users/TruePath/Build/math-site/db/seeds.rb:84:in `<main>'
/opt/local/bin/ruby_executable_hooks3.1:22:in `eval'
/opt/local/bin/ruby_executable_hooks3.1:22:in `<main>'
Tasks: TOP => db:seed
(See full trace by running task with --trace)

Ohh, just FYI, “Admin user already exists” and “Creating index page” are simply logging I did in db:seed before it fails.

That confirms the file is being loaded due to an autoload set by Zeitwerk. All this seems normal by now.

Let’s see if db:seed is relevant. Does

bin/rails runner Question

raise?

No, it doesn’t. But I can reduce the code in seeds.rb to the following to produce the issue.

ipage = Page.new(title: 'Index')
ipage.references.each { |r| puts r.inspect }

The problem seems to be when I have a page object and I iterate through it’s references (there are none since I just created the object) (and I tried just directly loading Reference via DISABLE_SPRING=1 bin/rails runner Question no issue). I’m guessing that somehow it’s when I try and access the association something more is being loaded.

Pages includes the concern ReferenceableHelpers which is just the following (planning to add more later).

module ReferenceableHelpers
  extend ActiveSupport::Concern

  included do
    has_many :references, inverse_of: :referenceable, dependent: :destroy, class_name: 'Reference', foreign_key: 'referenceable_id'
  end

  def json_includes
    super.merge({ references: {} })
  end

end

where that is the other side of a relation defined as follows in the class Reference

class Reference < ApplicationRecord
  include JsonHelpers
  include ArchivableHelpers

  belongs_to_polymorphic :referenceable, allowed_classes: [Post, Page], foreign_key: 'referenceable_id', inverse_of: :posts, optional: false
...
end

Where belongs_to_polymorphic is just a method defined in ApplicationRecord that passes all the options and name through to belongs_to (with the polymorphic option). However, so you don’t have to spelunk through that I tried replacing it with:

class Reference < ApplicationRecord
  include JsonHelpers
  include ArchivableHelpers

  belong_to_simple_polymorphic :referenceable, allowed_classes: [Post, Page], foreign_key: 'referenceable_id', inverse_of: :posts, optional: false
...
end

where that has the method definition in ApplicationRecord

  def self.belong_to_simple_polymorphic(name, allowed_classes:, **options)
    belongs_to name, polymorphic: true, **options
  end

And the error still occurs. This is what convinced me it’s about the loading because if I change that code in Reference.rb to

class Reference < ApplicationRecord
  include JsonHelpers
  include ArchivableHelpers

  belong_to_simple_polymorphic :referenceable, allowed_classes: [], foreign_key: 'referenceable_id', inverse_of: :posts, optional: false
...
end

i.e., if I don’t mention the classes Page and Post, it loads fine. And the errors trace back through the places I’m mentioning my model classes in a call to a class macro (is that the right term?). Reference mentions Post as you just saw and then Post mentions Question in a similar fashion and then Question mentions Comment in a like manner.

Sorry this is getting kinda hairy.

Sorry, I meant I tried to load references via ``DISABLE_SPRING=1 bin/rails runner Reference``` and had no issue. I also tried doing the same with Page and Post and it seemed to run fine.

What’s strange in this situation is that the autoload of Comment means the constant was not defined, app/models/comment.rb is being loaded and Comment is not yet a class. So,

class Comment < ApplicationRecord
end

should define a new constant, for a new class, and therefore no superclass mismatch would be possible. It is all new! (I assume line 1 of that file is class Comment < ApplicationRecord).

Obviously, in that reasoning there’s a fault. I need to think about it.

Well thanks so much for your time. Luckily, the fact that it’s not showing up in web serving means I can forget about it for awhile until I finish development and want to start loading things into the db. If you (or anyone else) thinks of anything later please let me know but you’ve already put far more time into helping me than I could ever have expected.

Can you share what allowed_classes does? Is it caching class objects somewhere?

I can past the full code of belongs_to_polymorphic if you want but the error still happens when I comment out every use of allowed_classes in belongs_to_polymorphic (I didn’t do this before because I was worried it might cause some other error but I was eventually able to comment out everything). I still get the error when the definition is just

 def self.belongs_to_polymorphic(name, allowed_classes:, **options)
    belongs_to name, polymorphic: true, **options
end

So even when I actually just throw out allowed_classes the error seems to be happening. It seems to be something about them being mentioned not how they are used in the method.

Weird right?

From the description and the reduction to those two lines of code to trigger the error, I believe we should be able to reproduce in a minimal application, and with a shorter chain of references perhaps? What do you think?

1 Like

Sorry for the delay in getting back. I’ve only lurked before so I hit the new user post limit and then was informed my father had passed away so I got kinda distracted.

I was able to reproduce the error with a seeds.rb that consists of only

puts "#{Comment.inspect}"

Even while commenting out all the code in the Comment class.

So even though I can run

bin/rails runner Comment

And get no errors when but when I run rake db:seed (or rails db:seed) I get

Zeitwerk@rails.once: the namespace ActionText already exists, descending into /opt/local/lib/ruby3.1/gems/3.1.0/gems/actiontext-6.1.5/app/helpers/action_text
Zeitwerk@rails.once: autoload set for ActionText::ContentHelper, to be loaded from /opt/local/lib/ruby3.1/gems/3.1.0/gems/actiontext-6.1.5/app/helpers/action_text/content_helper.rb
Zeitwerk@rails.once: autoload set for ActionText::TagHelper, to be loaded from /opt/local/lib/ruby3.1/gems/3.1.0/gems/actiontext-6.1.5/app/helpers/action_text/tag_helper.rb
Zeitwerk@rails.once: the namespace ActionText already exists, descending into /opt/local/lib/ruby3.1/gems/3.1.0/gems/actiontext-6.1.5/app/models/action_text
Zeitwerk@rails.once: autoload set for ActionText::Record, to be loaded from /opt/local/lib/ruby3.1/gems/3.1.0/gems/actiontext-6.1.5/app/models/action_text/record.rb
Zeitwerk@rails.once: autoload set for ActionText::RichText, to be loaded from /opt/local/lib/ruby3.1/gems/3.1.0/gems/actiontext-6.1.5/app/models/action_text/rich_text.rb
Zeitwerk@rails.main: autoload set for ApplicationCable, to be autovivified from /Users/TruePath/Build/math-site/app/channels/application_cable
Zeitwerk@rails.main: autoload set for AlertsController, to be loaded from /Users/TruePath/Build/math-site/app/controllers/alerts_controller.rb
Zeitwerk@rails.main: autoload set for ApplicationController, to be loaded from /Users/TruePath/Build/math-site/app/controllers/application_controller.rb
Zeitwerk@rails.main: autoload set for ArticlesController, to be loaded from /Users/TruePath/Build/math-site/app/controllers/articles_controller.rb
Zeitwerk@rails.main: autoload set for CitesController, to be loaded from /Users/TruePath/Build/math-site/app/controllers/cites_controller.rb
Zeitwerk@rails.main: autoload set for ClaimsController, to be loaded from /Users/TruePath/Build/math-site/app/controllers/claims_controller.rb
Zeitwerk@rails.main: autoload set for CommentThreadsController, to be loaded from /Users/TruePath/Build/math-site/app/controllers/comment_threads_controller.rb
Zeitwerk@rails.main: autoload set for CommentsController, to be loaded from /Users/TruePath/Build/math-site/app/controllers/comments_controller.rb
Zeitwerk@rails.main: autoload set for FeedsController, to be loaded from /Users/TruePath/Build/math-site/app/controllers/feeds_controller.rb
Zeitwerk@rails.main: autoload set for HomeController, to be loaded from /Users/TruePath/Build/math-site/app/controllers/home_controller.rb
Zeitwerk@rails.main: autoload set for JournalsController, to be loaded from /Users/TruePath/Build/math-site/app/controllers/journals_controller.rb
Zeitwerk@rails.main: autoload set for NotificationsController, to be loaded from /Users/TruePath/Build/math-site/app/controllers/notifications_controller.rb
Zeitwerk@rails.main: autoload set for PageChangesController, to be loaded from /Users/TruePath/Build/math-site/app/controllers/page_changes_controller.rb
Zeitwerk@rails.main: autoload set for PagesController, to be loaded from /Users/TruePath/Build/math-site/app/controllers/pages_controller.rb
Zeitwerk@rails.main: autoload set for PostsController, to be loaded from /Users/TruePath/Build/math-site/app/controllers/posts_controller.rb
Zeitwerk@rails.main: autoload set for PublicationsController, to be loaded from /Users/TruePath/Build/math-site/app/controllers/publications_controller.rb
Zeitwerk@rails.main: autoload set for QuestionsController, to be loaded from /Users/TruePath/Build/math-site/app/controllers/questions_controller.rb
Zeitwerk@rails.main: autoload set for ResponsesController, to be loaded from /Users/TruePath/Build/math-site/app/controllers/responses_controller.rb
Zeitwerk@rails.main: autoload set for ReviewsController, to be loaded from /Users/TruePath/Build/math-site/app/controllers/reviews_controller.rb
Zeitwerk@rails.main: autoload set for TagsController, to be loaded from /Users/TruePath/Build/math-site/app/controllers/tags_controller.rb
Zeitwerk@rails.main: autoload set for UserListsController, to be loaded from /Users/TruePath/Build/math-site/app/controllers/user_lists_controller.rb
Zeitwerk@rails.main: autoload set for Users, to be autovivified from /Users/TruePath/Build/math-site/app/controllers/users
Zeitwerk@rails.main: autoload set for UsersController, to be loaded from /Users/TruePath/Build/math-site/app/controllers/users_controller.rb
Zeitwerk@rails.main: autoload set for WorksController, to be loaded from /Users/TruePath/Build/math-site/app/controllers/works_controller.rb
Zeitwerk@rails.main: autoload set for ArchivableController, to be loaded from /Users/TruePath/Build/math-site/app/controllers/concerns/archivable_controller.rb
Zeitwerk@rails.main: autoload set for AutocompleteController, to be loaded from /Users/TruePath/Build/math-site/app/controllers/concerns/autocomplete_controller.rb
Zeitwerk@rails.main: autoload set for CollectionController, to be loaded from /Users/TruePath/Build/math-site/app/controllers/concerns/collection_controller.rb
Zeitwerk@rails.main: autoload set for FulltextSearchController, to be loaded from /Users/TruePath/Build/math-site/app/controllers/concerns/fulltext_search_controller.rb
Zeitwerk@rails.main: autoload set for JsonApiController, to be loaded from /Users/TruePath/Build/math-site/app/controllers/concerns/json_api_controller.rb
Zeitwerk@rails.main: autoload set for PolicyController, to be loaded from /Users/TruePath/Build/math-site/app/controllers/concerns/policy_controller.rb
Zeitwerk@rails.main: autoload set for PostableController, to be loaded from /Users/TruePath/Build/math-site/app/controllers/concerns/postable_controller.rb
Zeitwerk@rails.main: autoload set for StreamController, to be loaded from /Users/TruePath/Build/math-site/app/controllers/concerns/stream_controller.rb
Zeitwerk@rails.main: autoload set for ValidatesController, to be loaded from /Users/TruePath/Build/math-site/app/controllers/concerns/validates_controller.rb
Zeitwerk@rails.main: autoload set for VotableController, to be loaded from /Users/TruePath/Build/math-site/app/controllers/concerns/votable_controller.rb
Zeitwerk@rails.main: autoload set for ApplicationHelper, to be loaded from /Users/TruePath/Build/math-site/app/helpers/application_helper.rb
Zeitwerk@rails.main: autoload set for ArticlesHelper, to be loaded from /Users/TruePath/Build/math-site/app/helpers/articles_helper.rb
Zeitwerk@rails.main: autoload set for CitesHelper, to be loaded from /Users/TruePath/Build/math-site/app/helpers/cites_helper.rb
Zeitwerk@rails.main: autoload set for ClaimsHelper, to be loaded from /Users/TruePath/Build/math-site/app/helpers/claims_helper.rb
Zeitwerk@rails.main: autoload set for CommentsHelper, to be loaded from /Users/TruePath/Build/math-site/app/helpers/comments_helper.rb
Zeitwerk@rails.main: autoload set for FeedsHelper, to be loaded from /Users/TruePath/Build/math-site/app/helpers/feeds_helper.rb
Zeitwerk@rails.main: autoload set for JournalsHelper, to be loaded from /Users/TruePath/Build/math-site/app/helpers/journals_helper.rb
Zeitwerk@rails.main: autoload set for NotificationsHelper, to be loaded from /Users/TruePath/Build/math-site/app/helpers/notifications_helper.rb
Zeitwerk@rails.main: autoload set for PublicationsHelper, to be loaded from /Users/TruePath/Build/math-site/app/helpers/publications_helper.rb
Zeitwerk@rails.main: autoload set for ReviewsHelper, to be loaded from /Users/TruePath/Build/math-site/app/helpers/reviews_helper.rb
Zeitwerk@rails.main: autoload set for UserListsHelper, to be loaded from /Users/TruePath/Build/math-site/app/helpers/user_lists_helper.rb
Zeitwerk@rails.main: autoload set for UsersHelper, to be loaded from /Users/TruePath/Build/math-site/app/helpers/users_helper.rb
Zeitwerk@rails.main: autoload set for ApplicationJob, to be loaded from /Users/TruePath/Build/math-site/app/jobs/application_job.rb
Zeitwerk@rails.main: autoload set for ApplicationMailer, to be loaded from /Users/TruePath/Build/math-site/app/mailers/application_mailer.rb
Zeitwerk@rails.main: autoload set for BibtexAttribute, to be loaded from /Users/TruePath/Build/math-site/app/misc/bibtex_attribute.rb
Zeitwerk@rails.main: autoload set for CustomBibEntry, to be loaded from /Users/TruePath/Build/math-site/app/misc/custom_bib_entry.rb
Zeitwerk@rails.main: autoload set for EnhancedParameters, to be loaded from /Users/TruePath/Build/math-site/app/misc/enhanced_parameters.rb
Zeitwerk@rails.main: autoload set for MetadataHash, to be loaded from /Users/TruePath/Build/math-site/app/misc/metadata_hash.rb
Zeitwerk@rails.main: autoload set for PubMetadataFetcher, to be loaded from /Users/TruePath/Build/math-site/app/misc/pub_metadata_fetcher.rb
Zeitwerk@rails.main: autoload set for SharedConstants, to be loaded from /Users/TruePath/Build/math-site/app/misc/shared_constants.rb
Zeitwerk@rails.main: autoload set for Alert, to be loaded from /Users/TruePath/Build/math-site/app/models/alert.rb
Zeitwerk@rails.main: autoload set for ApplicationRecord, to be loaded from /Users/TruePath/Build/math-site/app/models/application_record.rb
Zeitwerk@rails.main: autoload set for Article, to be loaded from /Users/TruePath/Build/math-site/app/models/article.rb
Zeitwerk@rails.main: autoload set for Cite, to be loaded from /Users/TruePath/Build/math-site/app/models/cite.rb
Zeitwerk@rails.main: autoload set for Claim, to be loaded from /Users/TruePath/Build/math-site/app/models/claim.rb
Zeitwerk@rails.main: autoload set for Comment, to be loaded from /Users/TruePath/Build/math-site/app/models/comment.rb
Zeitwerk@rails.main: autoload set for CommentThread, to be loaded from /Users/TruePath/Build/math-site/app/models/comment_thread.rb
Zeitwerk@rails.main: autoload set for Feed, to be loaded from /Users/TruePath/Build/math-site/app/models/feed.rb
Zeitwerk@rails.main: autoload set for Journal, to be loaded from /Users/TruePath/Build/math-site/app/models/journal.rb
Zeitwerk@rails.main: autoload set for Notification, to be loaded from /Users/TruePath/Build/math-site/app/models/notification.rb
Zeitwerk@rails.main: autoload set for Page, to be loaded from /Users/TruePath/Build/math-site/app/models/page.rb
Zeitwerk@rails.main: autoload set for PageChange, to be loaded from /Users/TruePath/Build/math-site/app/models/page_change.rb
Zeitwerk@rails.main: autoload set for Post, to be loaded from /Users/TruePath/Build/math-site/app/models/post.rb
Zeitwerk@rails.main: autoload set for Publication, to be loaded from /Users/TruePath/Build/math-site/app/models/publication.rb
Zeitwerk@rails.main: autoload set for Question, to be loaded from /Users/TruePath/Build/math-site/app/models/question.rb
Zeitwerk@rails.main: autoload set for Reference, to be loaded from /Users/TruePath/Build/math-site/app/models/reference.rb
Zeitwerk@rails.main: autoload set for Response, to be loaded from /Users/TruePath/Build/math-site/app/models/response.rb
Zeitwerk@rails.main: autoload set for Review, to be loaded from /Users/TruePath/Build/math-site/app/models/review.rb
Zeitwerk@rails.main: autoload set for Tag, to be loaded from /Users/TruePath/Build/math-site/app/models/tag.rb
Zeitwerk@rails.main: autoload set for TagFollow, to be loaded from /Users/TruePath/Build/math-site/app/models/tag_follow.rb
Zeitwerk@rails.main: autoload set for TagSynonym, to be loaded from /Users/TruePath/Build/math-site/app/models/tag_synonym.rb
Zeitwerk@rails.main: autoload set for Tagging, to be loaded from /Users/TruePath/Build/math-site/app/models/tagging.rb
Zeitwerk@rails.main: autoload set for User, to be loaded from /Users/TruePath/Build/math-site/app/models/user.rb
Zeitwerk@rails.main: autoload set for UserList, to be loaded from /Users/TruePath/Build/math-site/app/models/user_list.rb
Zeitwerk@rails.main: autoload set for UserListMembership, to be loaded from /Users/TruePath/Build/math-site/app/models/user_list_membership.rb
Zeitwerk@rails.main: autoload set for Work, to be loaded from /Users/TruePath/Build/math-site/app/models/work.rb
Zeitwerk@rails.main: autoload set for AlertHelpers, to be loaded from /Users/TruePath/Build/math-site/app/models/concerns/alert_helpers.rb
Zeitwerk@rails.main: autoload set for ArchivableHelpers, to be loaded from /Users/TruePath/Build/math-site/app/models/concerns/archivable_helpers.rb
Zeitwerk@rails.main: autoload set for AttachmentHelpers, to be loaded from /Users/TruePath/Build/math-site/app/models/concerns/attachment_helpers.rb
Zeitwerk@rails.main: autoload set for AutocompleteHelpers, to be loaded from /Users/TruePath/Build/math-site/app/models/concerns/autocomplete_helpers.rb
Zeitwerk@rails.main: autoload set for FullTextSearchHelpers, to be loaded from /Users/TruePath/Build/math-site/app/models/concerns/full_text_search_helpers.rb
Zeitwerk@rails.main: autoload set for JsonHelpers, to be loaded from /Users/TruePath/Build/math-site/app/models/concerns/json_helpers.rb
Zeitwerk@rails.main: autoload set for NotificationHelpers, to be loaded from /Users/TruePath/Build/math-site/app/models/concerns/notification_helpers.rb
Zeitwerk@rails.main: autoload set for PostableHelpers, to be loaded from /Users/TruePath/Build/math-site/app/models/concerns/postable_helpers.rb
Zeitwerk@rails.main: autoload set for ReferenceableHelpers, to be loaded from /Users/TruePath/Build/math-site/app/models/concerns/referenceable_helpers.rb
Zeitwerk@rails.main: autoload set for SlugHelpers, to be loaded from /Users/TruePath/Build/math-site/app/models/concerns/slug_helpers.rb
Zeitwerk@rails.main: autoload set for StreamableHelpers, to be loaded from /Users/TruePath/Build/math-site/app/models/concerns/streamable_helpers.rb
Zeitwerk@rails.main: autoload set for TaggableHelpers, to be loaded from /Users/TruePath/Build/math-site/app/models/concerns/taggable_helpers.rb
Zeitwerk@rails.main: autoload set for TopicHelpers, to be loaded from /Users/TruePath/Build/math-site/app/models/concerns/topic_helpers.rb
Zeitwerk@rails.main: autoload set for VotableHelpers, to be loaded from /Users/TruePath/Build/math-site/app/models/concerns/votable_helpers.rb
Zeitwerk@rails.main: autoload set for AlertPolicy, to be loaded from /Users/TruePath/Build/math-site/app/policies/alert_policy.rb
Zeitwerk@rails.main: autoload set for ApplicationPolicy, to be loaded from /Users/TruePath/Build/math-site/app/policies/application_policy.rb
Zeitwerk@rails.main: autoload set for ArticlePolicy, to be loaded from /Users/TruePath/Build/math-site/app/policies/article_policy.rb
Zeitwerk@rails.main: autoload set for CitePolicy, to be loaded from /Users/TruePath/Build/math-site/app/policies/cite_policy.rb
Zeitwerk@rails.main: autoload set for ClaimPolicy, to be loaded from /Users/TruePath/Build/math-site/app/policies/claim_policy.rb
Zeitwerk@rails.main: autoload set for CommentPolicy, to be loaded from /Users/TruePath/Build/math-site/app/policies/comment_policy.rb
Zeitwerk@rails.main: autoload set for CommentThreadPolicy, to be loaded from /Users/TruePath/Build/math-site/app/policies/comment_thread_policy.rb
Zeitwerk@rails.main: autoload set for FeedPolicy, to be loaded from /Users/TruePath/Build/math-site/app/policies/feed_policy.rb
Zeitwerk@rails.main: autoload set for JournalPolicy, to be loaded from /Users/TruePath/Build/math-site/app/policies/journal_policy.rb
Zeitwerk@rails.main: autoload set for NotificationPolicy, to be loaded from /Users/TruePath/Build/math-site/app/policies/notification_policy.rb
Zeitwerk@rails.main: autoload set for PageChangePolicy, to be loaded from /Users/TruePath/Build/math-site/app/policies/page_change_policy.rb
Zeitwerk@rails.main: autoload set for PagePolicy, to be loaded from /Users/TruePath/Build/math-site/app/policies/page_policy.rb
Zeitwerk@rails.main: autoload set for PostPolicy, to be loaded from /Users/TruePath/Build/math-site/app/policies/post_policy.rb
Zeitwerk@rails.main: autoload set for PublicationPolicy, to be loaded from /Users/TruePath/Build/math-site/app/policies/publication_policy.rb
Zeitwerk@rails.main: autoload set for QuestionPolicy, to be loaded from /Users/TruePath/Build/math-site/app/policies/question_policy.rb
Zeitwerk@rails.main: autoload set for ReferencePolicy, to be loaded from /Users/TruePath/Build/math-site/app/policies/reference_policy.rb
Zeitwerk@rails.main: autoload set for ResponsePolicy, to be loaded from /Users/TruePath/Build/math-site/app/policies/response_policy.rb
Zeitwerk@rails.main: autoload set for ReviewPolicy, to be loaded from /Users/TruePath/Build/math-site/app/policies/review_policy.rb
Zeitwerk@rails.main: autoload set for TagFollowPolicy, to be loaded from /Users/TruePath/Build/math-site/app/policies/tag_follow_policy.rb
Zeitwerk@rails.main: autoload set for TagPolicy, to be loaded from /Users/TruePath/Build/math-site/app/policies/tag_policy.rb
Zeitwerk@rails.main: autoload set for UserListPolicy, to be loaded from /Users/TruePath/Build/math-site/app/policies/user_list_policy.rb
Zeitwerk@rails.main: autoload set for UserPolicy, to be loaded from /Users/TruePath/Build/math-site/app/policies/user_policy.rb
Zeitwerk@rails.main: autoload set for WorkPolicy, to be loaded from /Users/TruePath/Build/math-site/app/policies/work_policy.rb
Zeitwerk@rails.main: autoload set for FulltextSearchPolicy, to be loaded from /Users/TruePath/Build/math-site/app/policies/concerns/fulltext_search_policy.rb
Zeitwerk@rails.main: autoload set for PostablePolicy, to be loaded from /Users/TruePath/Build/math-site/app/policies/concerns/postable_policy.rb
Zeitwerk@rails.main: autoload set for StreamPolicy, to be loaded from /Users/TruePath/Build/math-site/app/policies/concerns/stream_policy.rb
Zeitwerk@rails.main: autoload set for TaggablePolicy, to be loaded from /Users/TruePath/Build/math-site/app/policies/concerns/taggable_policy.rb
Zeitwerk@rails.main: autoload set for VotablePolicy, to be loaded from /Users/TruePath/Build/math-site/app/policies/concerns/votable_policy.rb
Zeitwerk@rails.main: autoload set for AdminScrubber, to be loaded from /Users/TruePath/Build/math-site/app/scrubbers/admin_scrubber.rb
Zeitwerk@rails.main: autoload set for CommentScrubber, to be loaded from /Users/TruePath/Build/math-site/app/scrubbers/comment_scrubber.rb
Zeitwerk@rails.main: autoload set for DefaultScrubber, to be loaded from /Users/TruePath/Build/math-site/app/scrubbers/default_scrubber.rb
Zeitwerk@rails.main: autoload set for PostableScrubber, to be loaded from /Users/TruePath/Build/math-site/app/scrubbers/postable_scrubber.rb
Zeitwerk@rails.main: autoload set for TitleScrubber, to be loaded from /Users/TruePath/Build/math-site/app/scrubbers/title_scrubber.rb
Zeitwerk@rails.main: autoload set for SqlHelper, to be loaded from /Users/TruePath/Build/math-site/app/sql_helpers/sql_helper.rb
Zeitwerk@rails.main: the namespace Devise already exists, descending into /opt/local/lib/ruby3.1/gems/3.1.0/gems/devise-4.8.1/app/controllers/devise
Zeitwerk@rails.main: autoload set for Devise::ConfirmationsController, to be loaded from /opt/local/lib/ruby3.1/gems/3.1.0/gems/devise-4.8.1/app/controllers/devise/confirmations_controller.rb
Zeitwerk@rails.main: autoload set for Devise::OmniauthCallbacksController, to be loaded from /opt/local/lib/ruby3.1/gems/3.1.0/gems/devise-4.8.1/app/controllers/devise/omniauth_callbacks_controller.rb
Zeitwerk@rails.main: autoload set for Devise::PasswordsController, to be loaded from /opt/local/lib/ruby3.1/gems/3.1.0/gems/devise-4.8.1/app/controllers/devise/passwords_controller.rb
Zeitwerk@rails.main: autoload set for Devise::RegistrationsController, to be loaded from /opt/local/lib/ruby3.1/gems/3.1.0/gems/devise-4.8.1/app/controllers/devise/registrations_controller.rb
Zeitwerk@rails.main: autoload set for Devise::SessionsController, to be loaded from /opt/local/lib/ruby3.1/gems/3.1.0/gems/devise-4.8.1/app/controllers/devise/sessions_controller.rb
Zeitwerk@rails.main: autoload set for Devise::UnlocksController, to be loaded from /opt/local/lib/ruby3.1/gems/3.1.0/gems/devise-4.8.1/app/controllers/devise/unlocks_controller.rb
Zeitwerk@rails.main: autoload set for DeviseController, to be loaded from /opt/local/lib/ruby3.1/gems/3.1.0/gems/devise-4.8.1/app/controllers/devise_controller.rb
Zeitwerk@rails.main: autoload set for DeviseHelper, to be loaded from /opt/local/lib/ruby3.1/gems/3.1.0/gems/devise-4.8.1/app/helpers/devise_helper.rb
Zeitwerk@rails.main: the namespace Devise already exists, descending into /opt/local/lib/ruby3.1/gems/3.1.0/gems/devise-4.8.1/app/mailers/devise
Zeitwerk@rails.main: autoload set for Devise::Mailer, to be loaded from /opt/local/lib/ruby3.1/gems/3.1.0/gems/devise-4.8.1/app/mailers/devise/mailer.rb
Zeitwerk@rails.main: the namespace ActionMailbox already exists, descending into /opt/local/lib/ruby3.1/gems/3.1.0/gems/actionmailbox-6.1.5/app/controllers/action_mailbox
Zeitwerk@rails.main: autoload set for ActionMailbox::BaseController, to be loaded from /opt/local/lib/ruby3.1/gems/3.1.0/gems/actionmailbox-6.1.5/app/controllers/action_mailbox/base_controller.rb
Zeitwerk@rails.main: autoload set for ActionMailbox::Ingresses, to be autovivified from /opt/local/lib/ruby3.1/gems/3.1.0/gems/actionmailbox-6.1.5/app/controllers/action_mailbox/ingresses
Zeitwerk@rails.main: the namespace Rails already exists, descending into /opt/local/lib/ruby3.1/gems/3.1.0/gems/actionmailbox-6.1.5/app/controllers/rails
Zeitwerk@rails.main: autoload set for Rails::Conductor, to be autovivified from /opt/local/lib/ruby3.1/gems/3.1.0/gems/actionmailbox-6.1.5/app/controllers/rails/conductor
Zeitwerk@rails.main: the namespace ActionMailbox already exists, descending into /opt/local/lib/ruby3.1/gems/3.1.0/gems/actionmailbox-6.1.5/app/jobs/action_mailbox
Zeitwerk@rails.main: autoload set for ActionMailbox::IncinerationJob, to be loaded from /opt/local/lib/ruby3.1/gems/3.1.0/gems/actionmailbox-6.1.5/app/jobs/action_mailbox/incineration_job.rb
Zeitwerk@rails.main: autoload set for ActionMailbox::RoutingJob, to be loaded from /opt/local/lib/ruby3.1/gems/3.1.0/gems/actionmailbox-6.1.5/app/jobs/action_mailbox/routing_job.rb
Zeitwerk@rails.main: the namespace ActionMailbox already exists, descending into /opt/local/lib/ruby3.1/gems/3.1.0/gems/actionmailbox-6.1.5/app/models/action_mailbox
Zeitwerk@rails.main: autoload set for ActionMailbox::InboundEmail, to be autovivified from /opt/local/lib/ruby3.1/gems/3.1.0/gems/actionmailbox-6.1.5/app/models/action_mailbox/inbound_email
Zeitwerk@rails.main: earlier autoload for ActionMailbox::InboundEmail discarded, it is actually an explicit namespace defined in /opt/local/lib/ruby3.1/gems/3.1.0/gems/actionmailbox-6.1.5/app/models/action_mailbox/inbound_email.rb
Zeitwerk@rails.main: autoload set for ActionMailbox::InboundEmail, to be loaded from /opt/local/lib/ruby3.1/gems/3.1.0/gems/actionmailbox-6.1.5/app/models/action_mailbox/inbound_email.rb
Zeitwerk@rails.main: autoload set for ActionMailbox::Record, to be loaded from /opt/local/lib/ruby3.1/gems/3.1.0/gems/actionmailbox-6.1.5/app/models/action_mailbox/record.rb
Zeitwerk@rails.main: the namespace ActiveStorage already exists, descending into /opt/local/lib/ruby3.1/gems/3.1.0/gems/activestorage-6.1.5/app/controllers/active_storage
Zeitwerk@rails.main: autoload set for ActiveStorage::BaseController, to be loaded from /opt/local/lib/ruby3.1/gems/3.1.0/gems/activestorage-6.1.5/app/controllers/active_storage/base_controller.rb
Zeitwerk@rails.main: autoload set for ActiveStorage::Blobs, to be autovivified from /opt/local/lib/ruby3.1/gems/3.1.0/gems/activestorage-6.1.5/app/controllers/active_storage/blobs
Zeitwerk@rails.main: autoload set for ActiveStorage::DirectUploadsController, to be loaded from /opt/local/lib/ruby3.1/gems/3.1.0/gems/activestorage-6.1.5/app/controllers/active_storage/direct_uploads_controller.rb
Zeitwerk@rails.main: autoload set for ActiveStorage::DiskController, to be loaded from /opt/local/lib/ruby3.1/gems/3.1.0/gems/activestorage-6.1.5/app/controllers/active_storage/disk_controller.rb
Zeitwerk@rails.main: autoload set for ActiveStorage::Representations, to be autovivified from /opt/local/lib/ruby3.1/gems/3.1.0/gems/activestorage-6.1.5/app/controllers/active_storage/representations
Zeitwerk@rails.main: the namespace ActiveStorage already exists, descending into /opt/local/lib/ruby3.1/gems/3.1.0/gems/activestorage-6.1.5/app/controllers/concerns/active_storage
Zeitwerk@rails.main: autoload set for ActiveStorage::FileServer, to be loaded from /opt/local/lib/ruby3.1/gems/3.1.0/gems/activestorage-6.1.5/app/controllers/concerns/active_storage/file_server.rb
Zeitwerk@rails.main: autoload set for ActiveStorage::SetBlob, to be loaded from /opt/local/lib/ruby3.1/gems/3.1.0/gems/activestorage-6.1.5/app/controllers/concerns/active_storage/set_blob.rb
Zeitwerk@rails.main: autoload set for ActiveStorage::SetCurrent, to be loaded from /opt/local/lib/ruby3.1/gems/3.1.0/gems/activestorage-6.1.5/app/controllers/concerns/active_storage/set_current.rb
Zeitwerk@rails.main: autoload set for ActiveStorage::SetHeaders, to be loaded from /opt/local/lib/ruby3.1/gems/3.1.0/gems/activestorage-6.1.5/app/controllers/concerns/active_storage/set_headers.rb
Zeitwerk@rails.main: the namespace ActiveStorage already exists, descending into /opt/local/lib/ruby3.1/gems/3.1.0/gems/activestorage-6.1.5/app/jobs/active_storage
Zeitwerk@rails.main: autoload set for ActiveStorage::AnalyzeJob, to be loaded from /opt/local/lib/ruby3.1/gems/3.1.0/gems/activestorage-6.1.5/app/jobs/active_storage/analyze_job.rb
Zeitwerk@rails.main: autoload set for ActiveStorage::BaseJob, to be loaded from /opt/local/lib/ruby3.1/gems/3.1.0/gems/activestorage-6.1.5/app/jobs/active_storage/base_job.rb
Zeitwerk@rails.main: autoload set for ActiveStorage::MirrorJob, to be loaded from /opt/local/lib/ruby3.1/gems/3.1.0/gems/activestorage-6.1.5/app/jobs/active_storage/mirror_job.rb
Zeitwerk@rails.main: autoload set for ActiveStorage::PurgeJob, to be loaded from /opt/local/lib/ruby3.1/gems/3.1.0/gems/activestorage-6.1.5/app/jobs/active_storage/purge_job.rb
Zeitwerk@rails.main: the namespace ActiveStorage already exists, descending into /opt/local/lib/ruby3.1/gems/3.1.0/gems/activestorage-6.1.5/app/models/active_storage
Zeitwerk@rails.main: autoload set for ActiveStorage::Attachment, to be loaded from /opt/local/lib/ruby3.1/gems/3.1.0/gems/activestorage-6.1.5/app/models/active_storage/attachment.rb
Zeitwerk@rails.main: autoload set for ActiveStorage::Blob, to be autovivified from /opt/local/lib/ruby3.1/gems/3.1.0/gems/activestorage-6.1.5/app/models/active_storage/blob
Zeitwerk@rails.main: earlier autoload for ActiveStorage::Blob discarded, it is actually an explicit namespace defined in /opt/local/lib/ruby3.1/gems/3.1.0/gems/activestorage-6.1.5/app/models/active_storage/blob.rb
Zeitwerk@rails.main: autoload set for ActiveStorage::Blob, to be loaded from /opt/local/lib/ruby3.1/gems/3.1.0/gems/activestorage-6.1.5/app/models/active_storage/blob.rb
Zeitwerk@rails.main: autoload set for ActiveStorage::Current, to be loaded from /opt/local/lib/ruby3.1/gems/3.1.0/gems/activestorage-6.1.5/app/models/active_storage/current.rb
Zeitwerk@rails.main: autoload set for ActiveStorage::Filename, to be loaded from /opt/local/lib/ruby3.1/gems/3.1.0/gems/activestorage-6.1.5/app/models/active_storage/filename.rb
Zeitwerk@rails.main: autoload set for ActiveStorage::Preview, to be loaded from /opt/local/lib/ruby3.1/gems/3.1.0/gems/activestorage-6.1.5/app/models/active_storage/preview.rb
Zeitwerk@rails.main: autoload set for ActiveStorage::Record, to be loaded from /opt/local/lib/ruby3.1/gems/3.1.0/gems/activestorage-6.1.5/app/models/active_storage/record.rb
Zeitwerk@rails.main: autoload set for ActiveStorage::Variant, to be loaded from /opt/local/lib/ruby3.1/gems/3.1.0/gems/activestorage-6.1.5/app/models/active_storage/variant.rb
Zeitwerk@rails.main: autoload set for ActiveStorage::VariantRecord, to be loaded from /opt/local/lib/ruby3.1/gems/3.1.0/gems/activestorage-6.1.5/app/models/active_storage/variant_record.rb
Zeitwerk@rails.main: autoload set for ActiveStorage::VariantWithRecord, to be loaded from /opt/local/lib/ruby3.1/gems/3.1.0/gems/activestorage-6.1.5/app/models/active_storage/variant_with_record.rb
Zeitwerk@rails.main: autoload set for ActiveStorage::Variation, to be loaded from /opt/local/lib/ruby3.1/gems/3.1.0/gems/activestorage-6.1.5/app/models/active_storage/variation.rb
Zeitwerk@rails.main: constant ApplicationRecord loaded from file /Users/TruePath/Build/math-site/app/models/application_record.rb
Zeitwerk@rails.main: constant AttachmentHelpers loaded from file /Users/TruePath/Build/math-site/app/models/concerns/attachment_helpers.rb
Zeitwerk@rails.main: constant JsonHelpers loaded from file /Users/TruePath/Build/math-site/app/models/concerns/json_helpers.rb
Zeitwerk@rails.main: constant AutocompleteHelpers loaded from file /Users/TruePath/Build/math-site/app/models/concerns/autocomplete_helpers.rb
Zeitwerk@rails.main: constant SqlHelper loaded from file /Users/TruePath/Build/math-site/app/sql_helpers/sql_helper.rb
Zeitwerk@rails.main: constant ArchivableHelpers loaded from file /Users/TruePath/Build/math-site/app/models/concerns/archivable_helpers.rb
Zeitwerk@rails.main: constant StreamableHelpers loaded from file /Users/TruePath/Build/math-site/app/models/concerns/streamable_helpers.rb
Zeitwerk@rails.main: constant User loaded from file /Users/TruePath/Build/math-site/app/models/user.rb
rake aborted!
TypeError: superclass mismatch for class Comment
/Users/TruePath/Build/math-site/app/models/comment.rb:1:in `<main>'
/Users/TruePath/Build/math-site/db/seeds.rb:84:in `<main>'
/opt/local/bin/ruby_executable_hooks3.1:22:in `eval'
/opt/local/bin/ruby_executable_hooks3.1:22:in `<main>'
Tasks: TOP => db:seed
(See full trace by running task with --trace)

So I’m a bit at a loss for how to try to reproduce it on a clean codebase since it doesn’t seem to have anything to do with mentioning the classes at the top level and I’m sure that a new rails app with just a Comment class would work. I’m thinking that your first guess that there is some other class named Comment out there or something might be right. I know it’s not in my codebase but maybe it’s somehow in a gem I included (I’m using a few gems like serrano, bibtex-ruby etc… that aren’t specifically for rails). Any suggestions for how I might be able to get some more info about what exactly is going on?

I tried removing the gems I could but some of them break the code before I hit this error so I’m hoping I can narrow it down a bit more rather than stabbing in the dark.

Hi @TruePath, my most sincere condolences.

It is really great that you could reduce even more and get rid of the references thing. We are getting closer.

The traces seem normal.

Since this situation is super weird, I’d like to reduce a few things that are probably innocent, but if they actually are will help reduce the scope even more.

Would it be possible to reduce the seeds file to

Comment

just that, no puts and no inspect call.

Then, could it be possible to delete the entire body of the Comment class?

Also, who is loading AttachmentHelpers and the rest of helpers and User? Can we delete the code that autoloads them?