The Wire · Showcase
BOOTSNAP PATCHES RUBY PARSER BUG; RAILS FIXES SPRING TEST WORKER SLOWDOWN
By RepoJournal · Filed · About Rails
Bootsnap shipped v1.24.3 to work around a critical Ruby parser bug that breaks compilation, while Rails eliminated a performance regression in forked test processes that was triggering unnecessary filesystem scans.
Bootsnap hit a nasty snag with Ruby's `RubyVM::InstructionSequence.compile_file` — it's using the wrong parser entirely [1]. The workaround was to switch to `.compile_file_prism`, but that method itself has a bug that ignores compile options, so the team had to patch both [2]. To make matters worse, file encoding defaults to the system locale, which breaks parsing on minimal Ruby setups where `LANG` isn't set [3]. Version 1.24.3 fixes both issues and forces UTF-8 parsing [4]. On the Rails side, a subtle memory leak was hiding in the test infrastructure: when Spring workers forked and cleared reloaders, the `ViewReloader` hook persisted and kept triggering expensive `Dir.[]` and `File.mtime` scans on every `prepend_view_path` call [5]. The fix deactivates the hook properly on reloader cleanup [6], which should restore Spring test performance for anyone running into this.
Action items
- → Upgrade bootsnap to 1.24.3 immediately if you're on 1.24.2 or hit parse errors rails/bootsnap [immediate]
- → Pull the ViewReloader fix into your Rails version if you run Spring tests rails/rails [plan]
- → Monitor Spring test performance after both upgrades rails/rails [monitor]
References
- [1] Workaround Ruby [Bug #22023] ↗ rails/bootsnap
- [2] Merge pull request #540 from byroot/use-proper-parser rails/bootsnap
- [3] Fix encoding in Ruby [Bug #22023] workaround rails/bootsnap
- [4] v1.24.3 ↗ rails/bootsnap
- [5] Deactivate ViewReloader hooks when reloaders are cleared ↗ rails/rails
- [6] Merge pull request #57285 from ariens/deactivate-view-reloader-hooks rails/rails
FAQ
- What changed in Rails on May 5, 2026?
- Bootsnap shipped v1.24.3 to work around a critical Ruby parser bug that breaks compilation, while Rails eliminated a performance regression in forked test processes that was triggering unnecessary filesystem scans.
- What should Rails teams do about it?
- Upgrade bootsnap to 1.24.3 immediately if you're on 1.24.2 or hit parse errors • Pull the ViewReloader fix into your Rails version if you run Spring tests • Monitor Spring test performance after both upgrades
- Which Rails repositories shipped on May 5, 2026?
- rails/bootsnap, rails/rails