Rails: Upgrading a Legacy Rails App Part 2
We continue the upgrade process from the previous episode. Now that our application is running on the stable version of 4.2.10 . We can start the process of upgrading to 5.2.1 . We will use the railsdiff.org extensively to guide us through the upgrade process.
Rails Upgrade Guide
These are some simple tips to help your upgrade to rails 5 a little easier.
- Some files can be replaced completely in the interest of saving time go ahead and copy over the raw file from the diff
- Some files need to be patched for example the Gemfile
- Some application specific file need to be patched / changed for example all your models now need to inherit from ApplicationRecord
- Read through the diff carefully, don't skip anything
- All the files in config/environments can be replaced completely so go ahead and copy the entire thing from the diff
- Puma is now the defacto application server for rails
- Be sure to copy over files that are entirely commented out since we may need them later