From the start, Rails was praised for being the easiest way to get Ruby on the web. Not only has it solidified itself as the easiest option, it’s become the best. Since then, many other options have arrived, but Rails is still the de facto framework for Ruby developers.
On June 30, 2016, Rails 5.0.0 was released. Since then, Ruby has spent more than 4,100 commits to make things simpler for users. Additionally, it’s released numerous iterations, including Rails 5.1.2, which was released on June 26, 2017.
To help illustrate just how far we’ve come since Ruby 4, let’s take a look at some of the highlights of Ruby 5.
Turbolinks have been part of Rails since version 4, but version 5 takes advantage of the more advanced TurboLinks 3. This streamlines the process and makes use of Rack middleware and HTML5 custom data attributes.
If you are familiar with the functionality of TurboLinks in your application, do not fret! Things are not changing significantly. TurboLinks 3 will be an evolutionary step towards better speed and better rendering.
As of April 27, 2017, there were several changelogs for ActionCable, which can be accessed here.
Two versions later, CoffeeScript is still around as a default option, and the decision has gained a wider acceptance. For some people, that’s because the “must use” fear didn’t pan out, and for others, it’s because they tried CoffeeScript and they liked it.
Ruby Version Support
When it debuted, Rails 5 only supported Ruby versions 2.2.1 and higher. As Ruby progresses as a language, backwards compatibility needs to be sacrificed for new features and older versions can’t be supported indefinitely. While Rails is no different, it made the sensible decision of only supporting the most widely used version, starting with 2.2.1 and including all stable releases after.
Because of this, it is unlikely that someone using Ruby 1.9.3 would want to move to Rails 5. It’s possible they will remain on a lower version until some other external factor forces an upgrade and a refactoring of the code. For some dev shops, that may not happen for years, which is perfectly understandable.
For some, this is a barrier to Rails 5. For others, it is an opportunity upgrade and improve an application that may be in need of some love.
Rails 5 is here to stay.
So far, we’ve appreciated the Turbolinks upgrade for better rendering, Action Cable for better real-time message handling, more CoffeeScript, and moving forward with the Ruby ecosystem.
If you can upgrade, upgrading is your best option. Though, depending on how much time you have, it may be a good idea to let the early adopters kick the tires.
What are your thoughts on Rails 5? Leave us a comment!