Rails 7.2 Unveiled: YJIT Default, DevContainers & Performance Boosts

Rails 7.2 introduces YJIT as the default JIT compiler, requires Ruby 3.3 for default use, adds automatic devcontainer generation with Redis, database, and headless Chrome support, reduces default Puma threads, and includes Brakeman security analysis, delivering notable performance and developer experience improvements.

21CTO
21CTO
21CTO
Rails 7.2 Unveiled: YJIT Default, DevContainers & Performance Boosts

Ruby on Rails 7.2 has been released, featuring YJIT (Yet another JIT) enabled by default and automatic generation of development containers.

The minimum required Ruby version is now 3.1, and to use YJIT as the default you need Ruby 3.3 or newer.

YJIT was developed by GitHub and Shopify’s Ruby team, originating in 2019, initially written in C and later ported to Rust for improved safety and tooling.

According to Shopify engineers, YJIT in Ruby 3.2 delivers a 38% speed increase over the interpreter, though memory usage concerns remain.

The Rails team promises a 15‑25% reduction in latency, and the default Docker deployment includes jemalloc for optimized memory allocation.

The default Puma thread count has been lowered from 5 to 3 based on production experience, reducing potential adverse effects of too many threads.

Rails 7.2 also adds a devcontainer configuration that can be generated when creating a new app with rails new or adding to an existing app with rails devcontainer.

The default devcontainer includes a Redis container, a selectable database (SQLite, PostgreSQL, MySQL, or MariaDB), and a headless Chrome container, assuming use of VS Code with the Dev Containers extension.

This setup ensures consistent environments across teams and isolates development dependencies from the host system.

Additional features in the release note include blocking unsupported browsers and adding progressive web app support, allowing Rails apps to run with some desktop‑app capabilities.

Rails 7.2 also ships with Brakeman, a static analysis security tool, enabled by default.

Rails, created by David Heinemeier Hansson in 2004, follows the “convention over configuration” principle and uses ActiveRecord for rapid data‑driven web development.

backend developmentRuby on RailsDevContainersYJIT
21CTO
Written by

21CTO

21CTO (21CTO.com) offers developers community, training, and services, making it your go‑to learning and service platform.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.