Closed aldesantis closed 4 years ago
@damianlegawiec I believe this is now ready. The existing initializer didn't account for the fact that Zeitwerk will still run its check when we require
the files in app/overrides
, unless we explicitly tell it to ignore that directory.
Thank you @aldesantis 👍
Hey there! 👋 Is there any plan to release a new Deface version with this fix?
Currently, Ruby overrides (
app/overrides/*.rb
) don't work properly with Rails 6 and Zeitwerk, because Zeitwerk expects each Ruby file underapp
(or any other autoloaded path) to define its corresponding constant. With this patch, we tell Zeitwerk to ignoreapp/overrides
in all Railties.Removing these paths from
eager_load_paths
, as Deface is currently doing, is not enough, because Zeitwerk will still ensure that each file under an autoloaded path follows its conventions (see how it overridesKernel#require
).