What’s new in Rails 7

The 5 changes you must know: JavaScript, Rails as an API, and more….

Maria Schuessler
Geek Culture
Published in
5 min readDec 21, 2021

--

Photo by Joshua Reddekopp on Unsplash

Rails is dead. Long live Rails

This is the chant everyone loves to clickbait with as soon as Rails releases an update. Or you know, if it’s the end of the year, and you’re trying to get more views on an article. But here’s the thing. Just like DHH’s legacy, Rails refuses to die. And maybe that’s a good thing. It’s almost 2022 and there are so many frameworks — React, Angular, Railwind, Meteor, ember, Mithril, etc. And that’s just scratching the surface.

Luckily, Rails continues to be there. And not only that, Rails continues to evolve. In a world so overwhelmed with the hottest JavaScript framework of the month, Rails continues to be the framework of choice for those of us too hipster to use node.js and too unhip to learn Go. Rails is always there, with its OOP approach and it relational SQL databases. A favorite of coding bootcamps and hobby developers, Rails is hanging in there. And in 2022, with Rails 7 (beta), exciting things are coming!

Let’s unpack them below.

1. Webpacker is dead (but actually!)

Raise your hand for every time you’ve typed rails:webpacker install and then spent the next 20 minutes of your life twiddling your thumbs, taking your dog on a walk, making a seven-course meal, learning watercolor painting, etc. You get the (pain)point. Webpacker is… robust. It’s not lightweight and it’s not the most elegant solution.

In Rails 7, Webpacker, UJS, and Turbolinks are replaced with Hotwire and Stimulus. This is truly THE most exciting thing about the release. Using the immortal words of DHH: “This makes for fast first-load pages, keeps template rendering on the server, and allows for a simpler, more productive development experience in any programming language, without sacrificing any of the speed or responsiveness associated with a traditional single-page application”.

Pretty cool, isn’t it? Intense JavaScript when you need it (like building a React front end), lightweight JavaScript when you just need the basics. This means smaller apps, more speed, and less of what everyone complained about in Rails circa 2018.

--

--

Maria Schuessler
Geek Culture

Music Product @ TikTok | Former Full-Stack Dev | Editor of StirCrazy! Mag | London-based | skippingcustoms.com