Add eager load paths to help prevent dependency load issues with Sidekiq workers
Originally opened at !3545 (closed) by @stanhu.
Relevant resources:
- https://github.com/mperham/sidekiq/wiki/FAQ#why-doesnt-sidekiq-autoload-my-rails-application-code
- https://github.com/mperham/sidekiq/issues/1281#issuecomment-27129904
- http://blog.arkency.com/2014/11/dont-forget-about-eager-load-when-extending-autoload
- https://github.com/rails/rails/blob/52ce6ece8c8f74064bb64e0a0b1ddd83092718e1/railties/lib/rails/engine.rb#L472-L479
- https://github.com/rails/rails/blob/v4.2.6/railties/lib/rails/paths.rb
Attempts to address #3661 (closed), #11896 (closed), #12769 (closed), #13521 (closed), #14131 (closed), #14589 (closed), #14759 (closed), #14825 (closed).