Automate Dependency Updates

Learn about automating the dependency updates in our Rails application.

We'll cover the following

Let’s automate dependency updates for our app by creating bin/update. This will do a few things. First, it will run bundle update. This command instructs Bundler to find the latest version of all dependencies that satisfy what is in Gemfile.

If we’ve followed the policy above, that should give us the latest point release of the minor version of Rails we are using and the latest version of all gems that are compatible with that version of Rails.

As a reminder and to check that we may still be behind the latest, we’ll then execute bundle outdated. This will tell us if there are newer versions available of any gems we are using, regardless of what versions are in our Gemfile. This can help if we’ve temporarily pinned gems to get around an issue and could unpin them. The script will then run bin/ci to see if the updates break anything.

Get hands-on with 1200+ tech skills courses.