New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rails console reload! does not eager load when told to #24819
Comments
|
Can you create an executable test script using one of the templates here, that would demonstrate the problem you are seeing? I think there are some configuration switches you have on, that we can't see :) |
|
I'm able to reproduce this issue on a new Rails 4.2.6 project following the steps above. (Although I'm not sure how to write an isolated test for it since it seems to rely on having loading a whole Rails app). |
|
cc @fxn, this probably has to do with |
|
I don't think we support using |
|
As long as If that's the case, it should be fairly straight-forward to plug the desired behaviour into the Reloader. PRs welcome. 😄 |
|
ping @fxn did you have a chance to look at this? |
|
What @matthewd said. Have you had a look at http://guides.rubyonrails.org/autoloading_and_reloading_constants.html#autoloading-and-sti? |
|
@sirwolfgang Do you have enough info? |
|
This issue has been automatically marked as stale because it has not been commented on for at least three months. |
|
anyone knows if |
|
Digging through # config/initializers/eager_reloading.rb
Rails.application.reloader.after_class_unload do
Rails.application.eager_load! if Rails.application.config.eager_load
endSeems to work like a charm for me - both for console |
|
I am still able to reproduce on 6.1.4.6 |
|
This is fixed by 9971f77. I recall this was not possible in |
No, I was mistaken, it used |
|
@fxn the change made to fix this is causing Railties tests to fail https://buildkite.com/rails/rails/builds/85890 |
|
This patch was unfortunate. Normally I work on a branch and wait for CI, I believed I was working on a branch as usual, but wasn't and pushed directly. And then, missed CI was red. It's fixed in |
Steps to reproduce
Using the following STI class structure, with eager loading on.
Expected behavior
The
reload!command should of reloaded all of the eager loaded content.Actual behavior
The
reload!command does not seem to reload all the eager loaded content.System configuration
Rails version: Rails 4.2.6
Ruby version: ruby 2.3.0p0 (2015-12-25 revision 53290) [x86_64-darwin15]
The text was updated successfully, but these errors were encountered: