Skip to content

Instantly share code, notes, and snippets.

@adagio
Created November 13, 2018 22:25
Show Gist options
  • Save adagio/f3c849792eaff31de991eb209defcf65 to your computer and use it in GitHub Desktop.
Save adagio/f3c849792eaff31de991eb209defcf65 to your computer and use it in GitHub Desktop.
Github: Upgrading from Rails 3.2 to 5.2. Took a year and a half

Github: Upgrading from Rails 3.2 to 5.2.

Took a year and a half

Introduction

2018 September

clean up technical debt

improve codebase

How did we do it?

large and trafficked application

Require

  • careful planning
  • good organization
  • ⏳ patience

When?

  • 1st. at free time
  • then. ⭐ priority

dual boot

  • Gemfile.lock
  • Gemfile_next.lock

CI job

Engineers to get used to writing code that worked in multiple versions of Rails

testing environment

  • click test
    • 🚧 fixing regressions

deploy to % of production servers

  • collect data about
    • exceptions
    • performance

fix bugs

  • error rate low enough

Lessons Learned

👵🏻Codebase is 10 years old

Upgrade early and upgrade often

Add a build to run against the master branch

  • catch bugs

Save your application code for what truly makes your company special

Avoid using private APIs

⚠️ Ensure that the line where your applications ends and your framework begins is clear

Do incremental updates

Expect things to break

  • due to large size of the application
  • issues with CI, local development, slow queries

Was it worth it?

Rails upgrades

  • are
    • a lot of hard work
    • can be time-consuming
  • but they also
    • 💎 open up a ton possibilities
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment