-
Notifications
You must be signed in to change notification settings - Fork 276
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
Update Reloading to Support Zeitwerk in Rails Development Environment #1675
Comments
Thank you for the report. We converted all our gems to zeitwerk except this one. I would love to get it done. Will conversion to zeitwerk alone fix your problems? |
@klobuczek I'm not sure. We are running Rails 7 which requires Ruby 2.7.0 or newer in But this issue has a checklist of issues to fix to get Rails 7 working on JRuby... and they're all checked off. So that seems to point to "yes". We're not too worried about it at this point. Most of my motivation in opening this issue was to help anyone else that might be trying to accomplish the same thing we are. |
@nathancolgate I'm talking about |
@klobuczek oh! I'm not sure. The README mentions v11 only being available on jRuby. |
we have not updated that as we have not released the MRI driver officially yet. |
@klobuczek Then that should work for us! Great! |
ActiveGraph relies on a Rails 3.x method for cache clearing:
before_remove_const
.We are running with the gem in a Rails 7 app. So the method is never called, and as such, we must restart our development server anytime we make a change to a node instance method.
FWIW: There is a Rails guide for upgrading it to Zeitwerk (the latest reloading library).
In our application, we monkey patch this in the initializer. It's one-to-one re-write of the current
before_remove_const
method. It's not perfect: we must add each ActiveGraph node (relationships are OK as-is), but it works:Code example (initializers/neo4j.rb)
Runtime information:
Neo4j database version: neo4j:4.0.9-community
activegraph
gem version: 10.2.0.beta.1rails
gem version: 7.0.3The text was updated successfully, but these errors were encountered: