rails-diff - compare rails generated files
2025-02-28
rails-diff via Ruby Weekly #740 is a tool which allows comparing the files generated by Rails during the installation or upgrade process with their current version in the local repository.
When dealing with Rails upgrades, or with generator *:install commands, I often find that figuring out the diffs and what needs to get updated or removed is the least enjoyable part of the process.
I have yet to try this tool, but lately I’ve been thinking of a few ways to improve this process:
- Make the diff easier to deal with by adding your own edits at the end of the generated files, unless changing a generated option value.
- Move your own changes to dedicated files which, by limiting the changes to the generated files to a minimum, would make dealing with diffs easier.
Either way, I’ll try these approaches on our applications at work and hopefully make upgrading Rails an enjoyable experience.