-
Notifications
You must be signed in to change notification settings - Fork 168
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
Is Apartment::Reloader still necessary? #151
Comments
@fsateler I think the reason is better explained here https://github.com/rails-on-services/apartment/blob/development/lib/apartment/reloader.rb#L8, as I understood it, this is necessary to reload apartment only after the files are reloaded. But I think maybe now there is a proper way to hook into the reload process after the files are reloaded, looking at the Reloader docs I think the |
AFAICT, to_prepare is invoked after the code has been reloaded: https://github.com/rails/rails/blob/main/activesupport/lib/active_support/reloader.rb#L58 |
Sorry I miss that part 😄 Maybe this isn't really necessary anymore. |
so, what you're suggesting, @fsateler is to completely remove the Reloader and move the console requiring to |
Indeed, that's what I think. But I asked because maybe there is some weird interaction I'm not aware of... |
None that I know of either. I'll create the branch and run our develop env against it. Suggest you do the same on your end @fsateler and @marcelolx to see if any of our envs breaks under those conditions |
Opened the draft PR. Things on my end seem to be working the same way. Will run my dev env for a few days with this branch but for now looks ok |
Thanks! will try it now |
**Implemented enhancements:** - Increase errors visibility by showing more information on the underlying error rather than a generic error 'Apartment::TenantNotFound' (#176) - Resolved #177 - Added rails 7 support (#178) **Fixed bugs:** - Fixing tenant_presence_check config in the README (#180) - Resolved #161 and #81 - Fixed sequence name (#187) **Closed issues:** - Resolved #151 - removed reloader and console overwrite of reload method (#174)
With 2.11.0, the console.rb helpers are not available in the rails console anymore. They are back if I downgrade to 2.9.0.
Is it related to this change? Should the helpers be loaded manually now? (ruby 3.0.3, rails 6.1.4.6) |
The comment in railtie.rb says:
But this is no longer (was it ever?) true: we have (and use)
to_prepare
. Maybe it is no longer necessary?The text was updated successfully, but these errors were encountered: