cookpad/chanko

When using zeitwerk, eager_load fails in production mode

ikad opened this issue · 1 comments

ikad commented

This can be avoided by letting zeitwerk do the work instead of using Chanko :: Loader.
So in my project I added the following code in config/application.rb

config.before_configuration do
  Chanko::Config.eager_load = false
end

Is it possible to add a decision process to determine if zeitwerk is used in the next part, like #57?
https://github.com/cookpad/chanko/blob/master/lib/chanko/railtie.rb#L24
https://github.com/cookpad/chanko/blob/master/lib/chanko/railtie.rb#L30

Sorry for replying late
I fixed reported issue at this PR #64

As a breaking change, Chanko::Config.eager_load was removed and changed to reference Rails.configuration.eager_load.