Getting ready for Rails 7 by shifting to Zeitwerk autoloader (Rails 6.1.4.4 on Ruby 2.7.5). Turned off the config.autoloader = :classic
line in application.rb. App is loading 6.1 defaults.
Dev mode runs fine, but production fails on boot (also fails locally in production mode):
pid=4 tid=2l2g WARN: Zeitwerk::NameError: expected file /app/app/navigation_renderers/public_issue_renderer.rb to define constant PublicIssueRenderer, but didn't
pid=4 tid=2l2g WARN: /app/vendor/bundle/ruby/2.7.0/gems/zeitwerk-2.5.3/lib/zeitwerk/loader/callbacks.rb:25:in `on_file_autoloaded'
(This is on Heroku-20 in a staging environment).
That file does define that as a class, however.:
module SimpleNavigation
module Renderer
class PublicIssueRenderer < SimpleNavigation::Renderer::Base
[functions removed for brevity]
end
end
end
I am not sure why the double /app/app
exists, as the directory is simply in app along with everything else: