Avoid Long-Lived Upgrade Branches
The most common reason Rails upgrades stall is maintaining a separate six-month upgrade branch while product teams keep merging features onto main. Merge conflicts compound daily until the upgrade feels impossible.
Instead, introduce a dual-boot Gemfile setup so every pull request runs automated tests against both your current Rails version and the target version simultaneously.
- Pin a Gemfile.next lockfile alongside your production Gemfile.lock
- Fix deprecation warnings incrementally inside regular product sprints
- Ship one minor Rails jump at a time behind canary traffic
# Dual-boot target version via environment flag in CI
if ENV["RAILS_NEXT"] == "1"
gem "rails", "~> 8.0.0"
else
gem "rails", "~> 7.2.0"
endKey principle: Dual-booting keeps main continuously deployable while shrinking upgrade risk into small daily commits.