Rails 6 is released, tested and ready for use.
Here's the summary from DHH on what's included:
"While we took a little while longer with the final version than expected, the time was spent vetting that Rails 6 is solid. In fact, GitHub, Shopify, and Basecamp, as well as plenty of other companies and applications, have been running the pre-release version of Rails 6 for months and months in production. We might not have caught everything, but if it’s good enough for GitHub, Shopify, and Basecamp, it’s probably good enough for you too!" – DHH, Ruby on Rails Creator
No point repeating everything he said, you can read the full post here.
But what does this mean for existing users?
There are plenty of new tools for developers to work with and speed up their development. As covered above; many applications these days require rich text editing, and we're particularly happy to see Action Mailbox, given our founder’s personal history contributing to Rails’ email functionality.
But it’s not just about having shiny new toys to play with. In real terms, like most of the new additions to Rails, the ‘toys’ are time-saving functions for your developers; time spent upgrading to new versions may well be saved with future feature development. Read that as: you not having to reinvent the wheel when developing new features.
Don’t forget – shiny new bits for your developers may even increase their happiness!
Make sure your test coverage is adequate
Before you get started on any upgrade (and really, you should have this before any major development on your app), make sure your test suite is up-to-date.
This is really important. This is REALLY important.
When upgrading you need to know if the changes you’ve made are going to create problems in other parts of your app, ranging from small things, such as labels not displaying, to entire pages not loading. Realistically, you can expect things to break with any upgrade. The virtue of tests is that they tell you where the breakages are, so your customers don’t.
Are your Gems ready for the update?
Your application likely relies on other libraries of code, known as “Gems” to provide functionality, such as file uploads, user authentication, etc. Sometimes the maintainers of these gems can take a while to make the necessary changes to make it compatible with new versions of Rails.
Hopefully, you take as much time considering the gems you are using as the time you spend deciding on the structure of your code.
For popular gems, upgrading generally isn’t a problem. While the new version of Rails is working its way through the beta testing stages, any compatibility issues will likely have been discovered and fixed by the time the final version is released. But for others, you should do a bit of an audit beforehand to verify that the gems that you rely on will indeed work with the new version of Rails.
It’s good practice to keep dependencies up-to-date, even between major Rails versions, to ensure that you’re receiving the benefits of bug fixes, security fixes, and not getting too far behind on upgrades.
bundler outdated will give you a list of the gems that have new versions. Updating and testing each one (thoroughly) will greatly ease your migration path to a new Rails version.
That said, if you’re waiting for the release of a gem that’s not maintained, this should similarly raise alarm bells and you should start looking toward a solution. This is technical debt raising its ugly head and you’re better off getting on top of it quickly.
But, my application’s working fine – do I really have to upgrade?
If there is no compelling case to move to Rails 6 now, we highly recommend you immediately upgrade to Rails 5.2. You won’t get the latest new features, but that will keep you on the upgrade path regarding bug and security fixes for a while, as per the current Rails maintenance policy (see below). Just bear in mind that as time marches on, Rails 5.2 will drop out of the versions supported by the Rails team; first for bug fixes, then for general security issues, then for severe security issues.
The scary bit. It really is important you upgrade.
Any app running a version of Rails lower than 5.1 or 5.2 will no longer receive general security patches. Older versions may receive updates for “severe” security issues, but not for much longer, and what is classified as “severe” is at the discretion of the Rails team.
Any app running a version of Rails less than 5.2 will no longer receive any bug fixes, meaning that any bug fixes will be up to you and your team to tackle.
At the end of the day, if you let your Ruby or Rails versions lapse, you're introducing technical debt, which, if not addressed, can make it difficult to add new functionality to your app or in extreme cases necessitate a full re-write of your codebase (ouch!)
A last note: don’t forget to upgrade Ruby.
Depending on how long since you have upgraded, you may need to upgrade your Ruby version, as Rails 6.0 requires at least Ruby 2.5.0.
Generally this is a simple task, but you do want to ensure you thoroughly test any changes you make. As mentioned above, you will likely run into issues with the gems that you rely on needing upgrading at this point, too, as many gems require a minimum version of Ruby.
Upgrading Ruby is also going to see performance improvements for your application. So again, it’s well worth it.
If you need help upgrading, we’re more than happy to give you a quote on the work needed and are generally willing to offer discounts for upgrades in certain conditions.
Good luck upgrading!
Receiving and processing inbound emails with Action Mailbox an...
Simple CSS Dark Theming for Accessibility
How structure and process are the most important things we del...
reinteractive is Australia’s largest dedicated Ruby on Rails development company. We don’t cut corners and we know what we are doing.
We are an organisation made up of amazing individuals and we take pride in our team. We are 100% remote work enabling us to choose the best talent no matter which part of the country they live in. reinteractive is dedicated to making it a great place for any developer to work.
Webinars are our online portal for tips, tricks and lessons learned in everything we do. Make the most of this free resource to help you become a better developer.
The Ruby on Rails Installfest includes a full setup of your development environment and step-by-step instructions on how to build your first app hosted on Heroku. Over 1,800 attendees to date and counting.
The Ruby on Rails Development Hub is a monthly event where you will get the chance to spend time with our team and others in the community to improve and hone your Ruby on Rails skills.