Breaking Change in Rails 6.1: Sprockets Fingerprinting
The article highlights a surprising breaking change in Rails 6.1 related to how static files are served. The author shares their experience while upgrading from Rails 5.2 to 6.1 and encountering issues with accessing certain image files. They explain that while all the images were served fine in Rails 5.2, one specific image, named 'something-supercool.svg', failed to be found in Rails 6.1. After investigating the issue, the author discovers that the problem lies in the Sprockets middleware, which is unable to locate the icon. The article provides insights into the code flow and explains that the breaking change was introduced in Rails 6.1 to ensure compatibility with esbuilds' base32 digests. The author expresses surprise at the lack of mention of this breaking change in the Changelog. The article concludes by emphasizing the importance of understanding Rails conventions and underscores in file names. This information is relevant for developers using Rails 6.1 and highlights the need to be aware of potential breaking changes during upgrades.