Upgrade strategy from Rails 4.2.4 to 6.0.3.4?
Background :
I started learning ruby & rails back in 2016. Built a fairly decent project as a self-learning project. Got busy with other stuff and didn't touch ruby or rails until this December. Got some basic tutorial projects going, but was curious on upgrading my old project that was built with Rails 4.2.4 (Ruby 2.3.0).
I would like to bring it up to Rails 6.0.3.4 as all my other tutorial & learning projects are using that version.
One part of the challenge would be to force me to start writing Mini Tests as that would be a life saver when it comes to checking if the app still works at current newly upgraded version and/or where it breaks.
Problem/Question:
Should I upgrade step by step?
from 4.2.4 to last 4.x.x version (4.2.11.3), then 5.2.4.4, then 6.0.3.4?
Or should I just go from 4.2.4 to 6.0.3.4 directly?
Upgrading from 4.2 to 5.2 to 6.1 would certainly give you some thorough testing of the changes and would be a bit less daunting.
You can probably upgrade straight to 6.1, but you'll want to go through all the upgrade notes to make sure you know of all the changes between. Things like belongs_to being required by default might catch you off guard if you skip straight to the latest version and miss that in the Rails 5 release notes. 😅