title: How can I preload concerns in a rails initializer using Rails 6/Zeitwerk?
body: <p>I'm working with an initializer that does some monkey patching on app start by including some app concerns into a third party lib. Basically:</p>
  
  <pre><code># config/initializers/my_initializer.rb
  
  class SomeExternalLib
    include MyConcern1
    include MyConcern2
  end
  </code></pre>
  
  <p>This works fine in Rails 5.2.3, but I got the following deprecation message when upgrading to Rails 6:</p>
  
  <blockquote>
    <p>DEPRECATION WARNING: Initialization autoloaded the constants MyConcern1, and MyConcern2.</p>
    
    <p>Being able to do this is deprecated. Autoloading during initialization is going
    to be an error condition in future versions of Rails.</p>
    
    <p>Reloading does not reboot the application, and therefore code executed during
    initialization does not run again. So, if you reload ApplicationHelper, for example,
    the expected changes won't be reflected in that stale Module object.</p>
    
    <p>These autoloaded constants have been unloaded.</p>
    
    <p>Please, check the "Autoloading and Reloading Constants" guide for solutions.
     (called from  at /Users/myuser/code/myapp/config/environment.rb:7)</p>
  </blockquote>
  
  <p>My concerns are in app/controllers/concerns/. After some investigation, I figured out that that path wasn't being autoloaded, but I can't figure out how to make Zeitwerk—Rails 6's new autoloader—load this dynamically. I tried following the pattern for STI autoloading described <a href="https://weblog.rubyonrails.org/2019/2/22/zeitwerk-integration-in-rails-6-beta-2/#stis" rel="noreferrer">here</a>, but no luck. Any idea how to address this deprecation warning?</p>