Rails 5.0 was released just over a month ago, and with no major releases since then it’s fair to say the team produced a really solid 5.0.0 version. There have been a number of articles detailing the changes to Rails in 5.0, so I won’t rehash the low-level changes here. What I want to do instead is outline a case for migrating your existing applications to Rails 5.0.
The biggest reason to upgrade to Rails 5 is if your application currently is on Rails 4.1.x or below. The Rails maintenance policy indicates that security patches to Rails will no longer be provided for Rails 4.1.x or earlier. If you’re using 4.1.x, you get support until Rails 5.1 is released, but there’s no advantage to waiting until then to upgrade.
What this means if you’re on an older version is that anytime a new security weakness is found in Rails, your application will remain vulnerable. If your application handles any important or sensitive information, this creates the business risk that your data will be compromised.
On a related note, if your application is still running Rails 4.1.x or below, it’s possible you are also still using Ruby 1.9.3, which is also no longer supported. Any security bugs found in Ruby will not be fixed for Ruby 1.9.3, which again means your application is exposed. Rails 5 requires Ruby 2.2, so by upgrading to Rails 5 you will automatically migrate to a modern Ruby.
Rails 5 also includes some security-specific enhancements that make it easier to build more secure applications.
The bottom line: upgrading to Rails 5 will enhance the security of many older applications.
Rails 5 includes a number of performance enhancements that will in all likelihood make your application run faster. The Ruby 2.2 requirement enables an improved garbage collector that will reduce overall memory usage. Behind the scenes, the Rails team has continued the ongoing optimization of the platform to wring more speed out of your applications. While each application will perform differently after the upgrade, it is not uncommon for applications to run 10% or more faster after the upgrade.
Rails 5 also includes TurboLinks 5, which can significantly improve the performance of Web-based applications. TurboLinks also now has adapters for iOS and Android so that you can build hybrid applications using native mobile navigation controls. Your application may need enhancement to take advantage of TurboLinks, but Rails 5 is a requirement to do so.
The bottom line: upgrading to Rails 5 will make many applications run faster and use less memory.
True story: Among my other duties, I am responsible for a Rails application that began over 10 years ago. When the
rails new command was run for that project, the world was quite different than it is today. The iPhone wasn’t available yet.
Facebook was still limited to college students. Amazon was still getting started with AWS, and I’m pretty sure EC2 wasn’t available yet. Since that application began, there have been massive shifts in what we expect our applications to do.
Today, applications more often need to support multiple channels (Web, mobile) and offer real-time communication. Building for these expectations is more difficult on older versions of Rails.
One trend is toward federating applications and moving toward loosely-coupled microservices architectures. Rails 5 integrates Rails API to speed the development of API-only (or API-also) applications. If you’re thinking about adopting microservices, Rails 5 can help you get there faster.
Another trend is that users now expect Web applications to be more dynamic, with real-time notifications and integrated communications. Action Cable makes it much easier to add real-time communication channels to your Web applications, and Action Cable joins the Rails family in Rails 5.
And the native mobile adapters for TurboLinks could help you deliver mobile versions of your application with less effort than going fully native.
The bottom line: Rails 5 gives your application a platform to build for the future.
Rails 5 is a solid release that will provide immediate advantages to most applications. It’s a solid platform for the next generation of Web applications, and upgrading is the only way for older applications to ensure that they are not using insecure versions of the platform.
You can find upgrade instructions here. Or get in touch and we can help you take the first step.
Share this Post