The ever-popular Ruby on Rails platform is finally coming out with its 7.0 version.
What does this mean for developers, and how is Rails improving upon their previous entry?
Ruby on Rails is a platform specifically designed and built for web app developers. Since its version 1 release in 2005, the web framework has endured increasing popularity thanks to its design philosophy and simplicity. Unlike many other web frameworks available to developers, Rails emphasizes making coding simple and less repetitive.
Their Convention over Configuration philosophy allows developers to skip over adding default aspects to their application as this is done automatically. This means that developers only need to change aspects such as table titles in corresponding databases when they deviate from convention. Design philosophy such as this saves huge amounts of time in the development process, as well as less repetition in the code.
What is the current version of Ruby on Rails?
The current version of Rail is version 6.1.4, released on December 9th 2020. This version improved on the previous 6.0 version by adding per-database connection switching, horizontal database sharding and more.
Is Rails 7.0 released?
Ruby on Rails version 7.0 has yet to be released, although different sources such as developer David Heinemeier Hansson reports that it should be released in Alpha form in the coming few weeks. This was confirmed when the Alpha was dropped on September 15th 2021, though the full release date has yet to be mentioned.
Applications must run in Zeitwerk mode
Any applications currently running in Classic must switch to Zeitwerk mode alongside the new update. Developers – don’t panic! Many Rails applications have reported that this switch is smooth and any problems so far have been an easy fix.
Default to import-mapped Hotwire
Webpacker, Turbolinks and UJS are being replaced with import maps with Hotwire as the default. This is perhaps the biggest change coming to the new Rails update, and will probably be the greatest additional feature since its first release in 2005.
Indefinite job retry
This change is about the possibility for unlimited retries of failing jobs.
Fixed autoloading during initialization
Applications should now be able to autoload reloadable constants during initialization outside of to_prepare blocks.
One of the more glaring problems of previous Rails versions has been the lack of encryption functionality. Encryption helps to prevent data tampering when transmitting information across the internet to increase security. This used to be handled by third-party Ruby gems to encrypt attributes, such as attr encrypted. However, Rails 7 will now include encryption services out of the box that’s easy to set up.
Preview generation error
PreviewError in Rails 7 is raised when a previewer process exits with non-0 status code. This feature allows developers to plan for preview errors rather than having to deal with nasty surprises later on.
Parallel Query Loading
Running previous complex, unrelated queries meant that you would have to run each query in series, taking large amounts of time. Now with Rails 7 queries can be run asynchronously and concurrently, saving time and energy.
The Rails 7 update is set to be its biggest yet and should mean huge improvements for web developers everywhere. From Hotwire implementation to parallel query processing, the new Rails design is optimized to make your life easier and less frustrating than ever before.