Upgrade Rails from 6.0 to 6.1

Upgrade Rails from 6.0 to 6.1

This article is part of our Upgrade Rails series. To see more of them, click here opens a new window .

This article will cover the most important aspects that you need to know to get your Ruby on Rails opens a new window application from version 6.0 opens a new window to 6.1 opens a new window .

  1. Preparations
  2. Ruby version
  3. Gems
  4. Config files
  5. Rails Guides
  6. Removals
  7. Next steps

1. Preparations

Before beginning with the upgrade process, we have some recommended preparations:

For full details check out our article on How to Prepare Your App for a Rails Upgrade opens a new window .

2. Ruby version

Rails 6.1 requires Ruby 2.5 opens a new window or later. Check out this table opens a new window to see all the required Ruby versions across all Rails versions.

3. Gems

Make sure you check the GitHub page of the gems you use for the project to find out its compatibility with Rails 6.1. In case you are the maintainer of the gem, you’ll need to make sure it supports Rails 6.1 and if it doesn’t, update it. A great site to checkout compatibility is RailsBump opens a new window .

4. Config files

Rails includes the rails app:update task opens a new window . You can use this task as a guideline as explained thoroughly in this post opens a new window .

As an alternative, check out RailsDiff opens a new window , which provides an overview of the changes in a basic Rails app between 6.0.x and 6.1.x (or any other source/target versions).

5. Rails Guides

It is important to check through the official Rails Guides opens a new window and follow any of the steps necessary for your application.

6. Removals

If you have ignored deprecation warnings on past version jumps, and haven’t been staying up to date with them you may find that you have issues with broken tests or broken parts of the application. If you have trouble figuring out why something is broken it may be because a deprecation is removed, so you can check through this list to see if this may be the case.

Railties
Action Pack
Action View
Action Mailer
Active Record
Active Storage
Active Support

7. Next steps

If you successfully followed all of these steps, you should now be running Rails 6.1! Do you have any other useful tips or recommendations? Did we miss anything important? Share them with us in the comments section.

If you’re not on Rails 6.1 yet, we can help! Download our free eBook: The Complete Guide to Upgrade Rails opens a new window .

Get the book