autoload vs eager load in docs clarify #27268

Closed
akostadinov opened this Issue Dec 5, 2016 · 1 comment

Comments

Projects
None yet
4 participants
@akostadinov

http://edgeguides.rubyonrails.org/autoloading_and_reloading_constants.html

It mentions eager load but doesn't explain how to use it. It is explained how to use autoload but autoload does not work reliably in production environment especially with threads. I think document should explain autoload should not be used at all and explain how eager loading is to be used, e.g.:

config.eager_load_paths << "#{Rails.root}/lib"

My understanding is bases on #13142 as well on my personal bad experience with a new app I'm writing. But I'm too new to rails to take on actually wording the docs. Thus filing an issue.

@fxn fxn self-assigned this Dec 5, 2016

@stale

This comment has been minimized.

Show comment
Hide comment
@stale

stale bot Mar 27, 2017

This issue has been automatically marked as stale because it has not been commented on for at least three months.
The resources of the Rails team are limited, and so we are asking for your help.
If you can still reproduce this error on the 5-1-stable branch or on master, please reply with all of the information you have about it in order to keep the issue open.
Thank you for all your contributions.

stale bot commented Mar 27, 2017

This issue has been automatically marked as stale because it has not been commented on for at least three months.
The resources of the Rails team are limited, and so we are asking for your help.
If you can still reproduce this error on the 5-1-stable branch or on master, please reply with all of the information you have about it in order to keep the issue open.
Thank you for all your contributions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment