Ruby on Rails: Redis Migration and Composite Key Fixes
Rails is migrating core Redis infrastructure to the redis-client library while fixing multiple composite primary key bugs that were causing silent data loss and crashes.
Duration: PT2M20S
Transcript
Good morning. This is your Rails developer briefing for June 2nd, 2026.
The framework is undergoing a significant Redis infrastructure modernization while addressing serious composite primary key reliability issues that have been silently breaking applications.
The biggest architectural change is Rails' migration from the Redis gem to redis-client across core components. Pull request 57004 reimplements the Redis cache store, followed by PR 57533 updating Action Cable's Redis adapter. This shift reduces dependency size and simplifies the subscription API, though it maintains RESP2 protocol compatibility to avoid new server requirements. The old Redis cache store becomes "DeprecatedRedisCacheStore" for smoother transitions.
Meanwhile, a cluster of composite primary key fixes addresses critical data integrity issues. PR 57530 fixes the find method silently returning empty arrays when composite key components are passed as strings - the typical format from request parameters or JSON. PR 57531 resolves similar string handling problems in collection ID writers that were raising "RecordNotFound" errors for existing records. PR 57534 tackles a particularly dangerous bug where "disable joins" associations were silently dropping data during in-memory grouping, causing records to simply disappear without errors.
Additional reliability improvements include PR 57532 fixing grouped calculations on belongs-to associations with composite keys, and PR 57439 resolving PostgreSQL range column schema dumps that generated invalid Ruby syntax.
On the Active Storage front, PR 57403 updates compatibility for ImageProcessing 2.0, which now requires explicit ruby-vips or mini_magick gems and blocks untrusted image formats for security.
These changes signal Rails' continued investment in performance and reliability fundamentals. If you're using composite primary keys or Redis caching in production, these updates address potential silent failures that could impact data integrity.
That's your Rails update. We'll be back tomorrow.