DEV Community

vaidhyanathan
vaidhyanathan

Posted on

1

[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.

Postmark Image

Speedy emails, satisfied customers

Are delayed transactional emails costing you user satisfaction? Postmark delivers your emails almost instantly, keeping your customers happy and connected.

Sign up

Top comments (4)

Collapse
 
rhymes profile image
rhymes • Edited

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!

Collapse
 
hbarahona profile image
hbarahona

☝️ 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!

Collapse
 
ben profile image
Ben Halpern

+1 on all this

Collapse
 
vaidhyanathan93 profile image
vaidhyanathan

Thanks you @rhymes

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay