In this blog post, I detail my journey upgrading a client’s Ruby from version 2.7 to 3.0. While some of the approaches I took may be tailored to their specific needs and might not directly apply to your situation, they offer insights into one possible path for upgrading Ruby, particularly in scenarios with limited test coverage.
Read moreThis article is part of our Upgrade Rails series. To see more of them, click here.
This article will cover the most important aspects that you need to know to get your Ruby on Rails application from version 7.0 to version 7.1.
Read moreWhen working on upgrades, we use the Dual-Boot technique so we can gradually update the app to work with the current version and the next one.
Eventually, the upgrade is done and the app is ready to drop the old version, but how do we handle that process? What are the steps between one upgrade and the next?
Read moreIf you have ever upgraded Rails from 5.2 to 6.0, you might have run into issues with changes that had been made to the value of ActionDispatch::Response#content_type
between the two versions.
If you have been lucky, you might not have even noticed there was a problem until Rails 6.0, after coming across this deprecation message:
Rails 6.1 will return Content-Type header without modification. If you want just the MIME type, please use `#media_type` instead.
What happened with ActionDispatch::Response#content_type
between Rails 5.2 to 6.1? In this article, we will go into some background to learn what this method does, look at the differences in ActionDispatch::Response#content_type
’s return value between the several Rails versions, and how you can fix the problem if you come across it in your codebase.
When you upgrade a Rails application from Rails 6.1 to 7.0, you may suddenly see a lot of changes in the schema.rb
file and wonder where those changes come from and how to deal with them.
In this post, we look at what those changes are, and how to deal with them when upgrading a Rails application.
Read moreAt FastRuby.io, we don’t always run rails app:update
in our process to upgrade Rails apps.
It might seem like a sacrilege - after all, that’s why the task was created, to make upgrading Rails as painless as possible, right? But we have found while upgrading dozens of applications that running rails app:update
isn’t the best idea in all situations.
In this article, you will learn what rails app:update
does, when it should not be used, and how to upgrade your Rails app without it.
Note: In Rails versions before 5.0, rails app:update
was called rake rails:update
.
If you are using the i18n gem with Ruby 3.0 or are planning to upgrade Ruby to 3.0 while using the i18n
gem, this blog post will cover a gotcha that can be tricky to understand.
We are used to checking the deprecation warnings displayed by Rails or warnings from different gems, but Ruby itself can also display warnings to help us find code that can be problematic.
In this article we will explore how to use them, how to analyze them, and some examples of interesting warnings that can be really helpful during upgrades.
Read moreWhen we work on Rails upgrades, most of the time we have to solve issues after updating the gems. These problems can go from simple and straightforward to really complex and hard to debug. Here we will discuss different skills and techniques that we use to complete the upgrade.
Read moreAre you considering an upgrade for your Rails or Ruby application, but you’re concerned about low test coverage? Don’t worry! In this post, we’ll explore effective strategies to address the risks associated with low test coverage. By implementing these strategies, you’ll be able to upgrade your application with confidence. Let’s dive in!
Read moreImagine having the ability to deploy the next version of Rails in a dual booted application on your Heroku staging server or review app before deploying it to production. This capability can help you avoid bugs and downtime in your live environment. In this blog post, we will guide you on how to deploy a Rails upgrade to a staging environment, allowing you to thoroughly test it before it goes live.
Read moreThere have been a lot of changes over the years in asset management for Ruby on Rails applications. The main question, after all the madness, is… “What should I do if I need to upgrade my Rails application?”
In this article we will talk about the options we have for each version jump.
Read moreYou are upgrading a Rails application. You finished fixing a deprecation warning and it’s not present anymore. You continue working on other tasks and one day you find out the deprecation is back in the codebase. New code was added using the deprecated behavior, but it was not detected and now it needs to be fixed again…
How can you prevent that from happening and, at the same time, let the team know?
Read moreUpgrading from Ruby 2 to Ruby 3 can be a challenging task, especially when your
Rails application relies on ActiveJob with Sidekiq. In the process, you may encounter
cryptic ArgumentError
exceptions that make the upgrade seem daunting. By following along
you’ll be well-equipped to avoid some of the hurdles that come your way.
Over the years, Rails has been changing the default way to handle assets while also adding different alternative options at the same time.
At first there were static files, then Sprockets appeared, then we had a choice between Webpacker and Sprockets for a few years, now Webpacker is gone and importmaps are the default. But jsbundling-rails and cssbundling-rails are also official options.
Sound confusing? In this article we’ll try to explain the history of all these changes.
Read more