Upgrade RailsEventStore (RES) gems to a newer version
Use this skill when upgrading RES gems (rails_event_store, ruby_event_store, aggregate_root, etc.) to a newer version.
RES is deeply integrated into this project. All gems must be upgraded together since they share a version. The dependency chain is:
rails_event_store (Gemfile in rails_application) — top-level Rails integrationruby_event_store (infra.gemspec) — core event storeaggregate_root (infra.gemspec) — aggregate root patternruby_event_store-active_record — AR repository (transitive)ruby_event_store-browser — event browser UI (transitive)ruby_event_store-transformations — type transformations (infra.gemspec, no version pin)arkency-command_bus — command bus (infra.gemspec, no version pin)apps/rails_application/Gemfile — rails_event_store with range constraintinfra/infra.gemspec — aggregate_root and ruby_event_store with pessimistic constraintBoth must allow the target version or be updated first.
cd apps/rails_application
bundle outdated | grep -iE "event|aggregate"
Visit https://github.com/RailsEventStore/rails_event_store/releases and review all versions between current and target. Pay attention to:
If the target version is outside current constraints:
infra/infra.gemspec — change ~> X.Y for aggregate_root and ruby_event_storeapps/rails_application/Gemfile — change range for rails_event_storecd apps/rails_application
bundle update rails_event_store ruby_event_store aggregate_root ruby_event_store-active_record ruby_event_store-browser
This updates both the rails_application Gemfile.lock AND infra's resolved versions (infra is a path gem).
The infra gem has its own Gemfile.lock for isolated testing:
cd infra
bundle update ruby_event_store aggregate_root
make test
Integration tests are the most important — they exercise the full RES stack including AR persistence, event subscriptions, and process managers.
Look for deprecation warnings in test output. Address them before they become errors in future versions.
If tests pass, these are the areas most likely to break on API changes:
infra/lib/infra/event_store.rb — EventStore wrapper, mapper pipeline, preserve_typesinfra/lib/infra/event.rb — Event base class extending RubyEventStore::Eventinfra/lib/infra/aggregate_root_repository.rb — AggregateRoot::Repository wrapperinfra/lib/infra/process_manager.rb — ProcessManager using event_store.read/linkinfra/lib/infra/process.rb — Simple event-to-command processapps/rails_application/config/initializers/rails_event_store.rb — RES initializationapps/rails_application/lib/configuration.rb — LinkByEventType, LinkByCorrelationId, LinkByCausationIdsubscribes_toInfra::EventStore to isolate changesUse the /commit skill. Good message example: "Upgrade RailsEventStore from 2.17.1 to 2.18.0"