Upgrading Rails

Extracted notes from RailsConf 2022

Why we have to upgrade?

  1. Possible improvements to performance

    Every new release might have a solution for existing performance issues

  2. More attractive to developers

    Nobody wants to work on outdated tech

  3. Easier to find helpful docs

    Developers write docs and engage with new updated documents and articles

  4. Security updates, bug fixes etc

    Some releases might have fixed security issues and fixed older bugs

  5. New framework features

    ActionCable, ActiveStorage, MultipleDBs, ActionText

Things to considered when upgrading

  1. Should be enough dedicated time

  2. Good test suit

  3. Persistant. Because you might end up with weird errors

  4. How many outdated gems you have?

Ways to upgrade

  1. Paying someone else to do the upgrade

  2. With long running branch

  3. Dualboot

How to do it then?

  1. Start with existing decprecation messages

  2. Update the Gemfile to upgrade Rails

  3. Check Rails's upgrade guide

  4. Run rails app:update

  5. Have one rollback plan

Tools available to help in upgrading rails

Reference: https://www.youtube.com/watch?v=NHZCQeh91p0&list=PLE7tQUdRKcyb2Mjtd1RBjeP3Jt9RukU7G&index=34

Last updated