If you look at the explanation of https://github.com/fxn/zeitwerk/issues/45, it is clear why this happens:
pundit is not defined,/administrate-0.11.0/app/controllers/concerns/administrate/punditize.rbAdministrate::Punditizeeager_load: expected <file> to define constant Administrate::PunditizeA solution would be:
Administrate::Punditize, but keep it empty if Pundit doesn't existas a workaround - add gem 'pundit' to Gemfile and it will work.
@SleeplessByte, thanks for raising this issue. Would you be able to provide specific steps to reproduce the issue so it is easier isolate the bug and fix it?
In your Gemfile (new rails project) add:
gem 'rails', '6.0.0.rc2'
gem 'administrate', '~>0.11'
Now add any administrate controller, and run rails in production mode (so that it definitely autoloads).
Given the tagged project in this issue (not mine), git checkout https://github.com/captproton/workcation_green/commit/6f1c3b12646dfea1707ca8045afdf60dbae8e8ff and running should also work as they added the workaround in the commit after this.
Another workaround for this is to not use zeitwerk, but instead the old autoloader. As per the blog post about zeitwerk integration add:
config.autoloader = :classic
to config/application.rb.
Most helpful comment
as a workaround - add
gem 'pundit'toGemfileand it will work.