The Gnar Company
The Gnar Company

December Gnarly Learnings #1: Rails 7 Release

by Ethan Fertsch

Each holiday season, one of the most highly-anticipated gifts for us here at The Gnar is a new Rails version. This year, Rails 7 was released on Dec. 15. The release is described by David Heinemeier Hansson (DHH), the creator of the Rails framework, as

the fulfillment of a vision to present a truly full-stack approach to web development that tackles both the front- and back-end challenges with equal vigor.

There are many exciting features in Rails 7, detailed in the article below. But some of the most compelling for us are those that minimize the reliance on nodeJS and other JavaScript dependencies. Namely:

  • The default JavaScript setup forgoes the full Webpack / Yarn / node toolchain, allowing more flexibility in the approach to front-end development.
  • JavaScript and CSS bundling are now pre-configurable rather than wrapped up in Webpacker, minimizing the dependency a single, complex gem.
  • Turbolinks and Rails UJS are swapped out for Turbo and Stimulus, respectively, making room for speedy DOM updates by sending HTML over the wire.

These changes are primarily in response to to industry changes such as increased browser support for ES6/ESM, the adoption of HTTP/2, import maps, and an increasing affinity for single-page applications (SPAs). We can't wait to get started upgrading and building our applications with Rails 7 in the New Year!

Read the full article at https://rubyonrails.org.