DEV Community


Posted on

[help needed] Rails application upgrade from 3.2 to 5.2

We were planning to upgrade my rails application which is a monolith application and having around a million LOC. What would be the best way to upgrade?

The following are the options
1) 3.2 -> 5.2 (Separate branch running for a long time, Total mess up)
2) 3.2->4.2 ->5.2 ((Separate branch running for a short time)
3) 3.2->4.0->4.1->4.2->5.0->5.1->5.2(Running in master periodically, But we may need to write code in particular version which may become obsolete in the next coming version)

I am planning to follow approach 3, but I am not sure which part is added in version (4.0 to 5.1) and removed in(4.2 to 5.2).

Did anyone did rails upgrade for their application, what was the approach.

PS: I saw many posts around this, but nothing solid.

Discussion (4)

rhymes profile image
rhymes • Edited on

I would follow option 3 as well. There are too many new things between 3.2 and 5.2. You might try option 2 but 3 seems longer but safer. Don't forget to run the tests at each change :D

The Rails Upgrading Guides plus the release notes for each version in the Rails blog, possibly the changelogs in GitHub and the search engine will be your best friends :D

Good luck!

hbarahona profile image

☝️ THIS!

I had to upgrade from 4.1 to 5.2, it was not a major problem, I recommend you follow the official guide that @rhymes mentioned, on the other hand, generate a new project in each version and compare only the base files, that will help a lot.

One step at a time, good luck!

ben profile image
Ben Halpern

+1 on all this

vaidhyanathan93 profile image
vaidhyanathan Author

Thanks you @rhymes