Today I learned that the Rails community isn't nearly lazy enough.
Here's why 👇 #200wordsTIL
I spent part of today looking into upgrading our aging Rails 4 backend to Rails 5. And when I say aging, I'm only half joking. We just upgraded to Ruby 2.3 a few weeks ago.
Ruby 2.3 is getting sunset in March. The version we upgraded from died last March.
Rails 5 came out 2 years ago.
We're a busy small team. Upgrades are never quite critical enough. 😇
A big part of _why_ we waited so long is that upgrades in the Rails ecosystems are often painful.
Indeed, Rails 5 has many breaking changes.
Models, jobs, and mailers get a new parent class. Tests require different argument order. Every belongs_to relationship get validations. Callbacks need to :halt, parameters aren't hashes.
That's a lot of changes. And they're all super easy. Find and replace.
There's even a tool that tells you what to change! rails app:update
It lists all the HUNDREDS OF FILES you have to find+replace in ...
Surely others have been in my shoes? Why is there no codemod? No little app that does this for me?
Is there really no Rails engineer lazy enough out there to automate this?