Closed socjopata closed 4 months ago
Rails app:template command seems to execute the run_bundle and run_after_bundle_callbacks anyway
This must have changed in Rails 7.1: https://github.com/RailsEventStore/rails_event_store/commit/3a19ac8ca0e5b0928984086feb261a772a3e82ba
It's been changed with the commit: https://github.com/rails/rails/commit/83e69c22e9ebfb3585c0fb6d536353f4f43fd483 I'll add a version check to the template and conditionally run `run_after_bundle_check' only for versions older than 7.1.
Hi,
I am just letting you know that the https://railseventstore.org/docs/v2/install/#existing-rails-application doesn't seem to work for existing Rails applications. I tested it locally both on one of my pet projects running on Rails 7.1.2 and on a fresh, vanilla Rails project generated with 7.1.3, so hopefully you'll be able to recreate it easily too.
The problem is that the app:template script creates duplicate migrations, as can be seen on the screenshot here:
and fails on trying to migrate them both:
Since Rails
app:template
command seems to execute therun_bundle
andrun_after_bundle_callbacks
anyway, I quickfixed it for myself, by executing the provided template locally, with the following code part removed: