Rails 6 has just been released with its first beta! We hope you’re excited, because we certainly are. Version 6.0.0 comes with a bunch of new features, like Action Mailbox, support for parallel testing and multiple databases. Let’s take a look at what exactly Rails 6 brings to the table and why it’s worth all this fuss.

If you’ve been wondering about what web framework to use in 2019, we have good news for you: the team developing Ruby on Rails has just announced a number of exciting improvements they’ve made in the new version of the framework. While it’s true that Rails has been around long enough to call it mature, it’s still a perfectly valid choice for web app development. Here’s our proof: Rails is growing, evolving and gifting us with new possibilities.

In fact, Ruby takes the 8th place among the most popular programming languages. Ruby on Rails is used for websites like Airbnb, GitHub and Hulu. The framework has almost 3,500 GitHub contributors, which goes to show just how active and robust the Rails community is. RoR is fast (getting faster with each new version), highly scalable and modular, and a perfect choice for startups thanks to how much it speeds up development. If you’re planning to build a web application, definitely consider using Ruby on Rails.

Which version, though? Perhaps looking at what 6.0.0 beta1 has to offer will help you make the right choice.

Action Mailbox

One of the two new frameworks (along with Action Text), Action MailBox’s main function is to make routing incoming emails easy. They’re directed to “controller-like mailboxes” for processing. Integration with Amazon SES, Mailgun, Mandrill, Postmark and SendGrid is built-in, along with the option to deal with inbound mails directly through Exim, Postfix and Qmail.

Action Text

This framework allows for easily adding rich text content support to any app. The Trix editor “handles everything from formatting to links to quotes to lists to embedded images and galleries”. And the content it generates is saved in its own RichText model. Attachments (including images) are stored with Active Storage, and associated with the RichText model.

Multiple DBs

Rails 6.0.0 introduces a simple API that supports multiple databases with Active Records. This upgrade is part of Rails’ scalable-by-default approach - it’s meant to make scaling easy by helping your app handle more data and traffic. Through this feature, a single app can connect to several databases at the same time, either to segment records or to improve performance.

Parallel Testing

Ruby on Rails already had solid testing support before 6.0.0, so we can’t help but feel a bit pampered. Parallel testing can speed up your testing suite in multicores environment. Another part of the scalable-by-default approach, parallel testing focuses on the idea that your test suite shouldn’t block development. With this new feature, you can take full advantage of your architecture’s performance potential and run big test suites faster, as “each testing worker gets its own database and runs in its own thread”.

Webpacker by default

A new default JavaScript bundler for RoR has been introduced through the new app/javascript directory - Webpacker. The team responsible for it didn’t move away from the asset pipeline with Sprockets for CSS and static assets. Instead, they made sure both options work well in tandem.

Conclusions

The improvements listed above are only the major changes introduced with 6.0.0. Yes, there’s more: Proper Action Cable testing, protection against DNS rebinding attacks and per-environment credentials. You can check it all out in the changelog. If you’re thinking it might be better to wait before trying 6.0.0 on production, just know that Basecamp has already done it. We, for one, can’t wait to see these new features introduced in our projects.

Interested in building your web app with Ruby on Rails 6? Or are you struggling with upgrading an existing project? iRonin’s experts have used RoR commercially since the company’s inception. If you’d like to know which of Rails’ features will benefit your project the most, we can help.