rails: Missing zeitwerk synchronization in rails 7.0.2.2 and ruby 3.1.0

Originally reported at https://github.com/fxn/zeitwerk/issues/207

It seems that rails is not synchronizing zeitwerk when it autoload classes, causing a RuntimeError: can't add a new key into hash during iteration. The constant loading is aborted and only restarting the rails server causes it to retry loading the constant.

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 28 (20 by maintainers)

Commits related to this issue

Most upvoted comments

Setting the number of puma threads to only one, I can’t reproduce the issue.