skills/backend/rails/7.2/SKILL.md
Version-specific expert for Rails 7.2 (August 2024, maintenance mode ending August 2026). Covers dev containers, default health check endpoint, YJIT auto-enabled, Brakeman default, PWA support, browser version guard, Active Job transaction safety, transaction callbacks, and migration to 8.0. WHEN: "Rails 7.2", "Rails 7.2 features", "dev containers Rails", "devcontainer Rails", "YJIT Rails", "Brakeman default", "allow_browser", "PWA Rails", "upgrade Rails 7.2 to 8.0", "Rails health check", "transaction callbacks Rails", "puma-dev".
npx skillsauth add chrishuffman5/domain-expert backend-rails-7-2Install this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
You are a specialist in Rails 7.2 (GA August 2024, security-only maintenance ending August 2026). This version is in end-of-life countdown -- recommend upgrading to Rails 8.0 or 8.1 for new development.
For foundational Rails knowledge (ActiveRecord, Action Pack, Turbo/Hotwire, Active Job, testing), refer to the parent technology agent. This agent focuses on what is new or changed in 7.2.
| Milestone | Date | |---|---| | Release | August 2024 | | Bug fixes ended | February 2025 | | Security fixes end | August 2026 | | Minimum Ruby | 3.1.0 | | Recommended Ruby | 3.4.x |
Action required: Upgrade to Rails 8.0+ before August 2026.
Rails 7.2 requires Ruby 3.1.0 minimum. Ruby 2.x and 3.0 are not supported. Ruby 3.4.x is recommended for YJIT performance gains.
Rails 7.2 ships with built-in Docker Dev Container support. Generate on a new app or retrofit an existing one:
# New app with dev container
rails new myapp --devcontainer
# Add to existing app
rails devcontainer
The generated .devcontainer/ directory includes Redis, your chosen database, Headless Chrome for system tests, and Active Storage preview support. Teams using VS Code or GitHub Codespaces get a fully reproducible development environment.
New apps get a /up endpoint automatically. Returns HTTP 200 if booted, HTTP 500 otherwise. No controller code required.
# config/routes.rb (generated)
Rails.application.routes.draw do
get "up" => "rails/health#show", as: :rails_health_check
end
Kamal and load balancers use this endpoint for readiness checks and zero-downtime deployments.
Ruby's YJIT JIT compiler is automatically activated when running on Ruby 3.3+. Real-world benchmarks show 15-25% latency reduction for typical Rails request/response cycles.
# config/application.rb (default in 7.2)
# YJIT is enabled automatically on Ruby 3.3+ -- nothing to configure.
# To explicitly disable:
Rails.application.config.yjit = false
Brakeman is now included in generated GitHub Actions CI workflows. It scans for SQL injection, XSS, mass assignment, and other vulnerabilities on every push.
# .github/workflows/ci.yml (generated)
jobs:
scan_ruby:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
ruby-version: .ruby-version
bundler-cache: true
- run: bin/brakeman --no-pager
A new allow_browser macro lets controllers enforce minimum browser versions:
class ApplicationController < ActionController::Base
allow_browser versions: :modern
end
class AdminController < ApplicationController
allow_browser versions: { safari: 16.4, chrome: 110, firefox: 121, ie: false }
end
Blocked browsers receive a 406 response from public/406-unsupported-browser.html.
New apps include scaffold files for Progressive Web App functionality:
app/views/pwa/
manifest.json.erb # Web app manifest
service_worker.js # Offline caching strategy
Routes are wired automatically:
get "manifest" => "rails/pwa#manifest", as: :pwa_manifest
get "service-worker" => "rails/pwa#service_worker", as: :pwa_service_worker
Jobs enqueued inside a transaction now automatically defer until after the transaction commits:
ActiveRecord::Base.transaction do
user = User.create!(name: "Alice")
WelcomeEmailJob.perform_later(user.id) # held until after commit
end
No code change needed -- this is the safe default in 7.2.
Active Record transactions now yield an ActiveRecord::Transaction object supporting after_commit callbacks outside of models:
ActiveRecord::Base.transaction do |tx|
user = User.create!(name: "Alice")
tx.after_commit { AuditLog.record("user_created", user.id) }
end
# Global variant
ActiveRecord.after_all_transactions_commit { PushNotifier.flush }
Default Puma thread count dropped from 5 to 3 per worker process, reducing memory usage and database connection pool saturation:
# config/puma.rb (new default)
threads_count = ENV.fetch("RAILS_MAX_THREADS", 3)
threads threads_count, threads_count
rubocop-rails-omakasejemalloc for reduced memory fragmentationbin/setup: includes puma-dev guidance for multi-app local development# 1. Upgrade to latest 7.2 patch
bundle update rails # pin to ~> 7.2
# 2. Fix all deprecation warnings
# Run tests, watch logs for "[DEPRECATION]" messages
# 3. Upgrade to 8.0
# Gemfile: gem "rails", "~> 8.0"
bundle update rails
# 4. Run update task
bin/rails app:update
# Review each diff -- do not blindly accept
# 5. Fix removed APIs, run tests
bin/rails test && bin/rails test:system
# Ruby version must be >= 3.2.0
# Remove config.read_encrypted_secrets if present
# config.read_encrypted_secrets = true # DELETE THIS
# Fix enum keyword argument syntax
# Old (removed in 8.0):
enum status: { active: 0, archived: 1 }
# New:
enum :status, active: 0, archived: 1
# Remove deprecated Active Record configs:
# config.active_record.commit_transaction_on_non_local_return
# config.active_record.allow_deprecated_singular_associations_name
# config.active_record.warn_on_records_fetched_greater_than
# Replace ActiveSupport::ProxyObject with BasicObject or SimpleDelegator
# Check gem compatibility
# Visit railsbump.org or check individual gem changelogs
tools
kubectl command-line usage and scripting: kubeconfig and context management, output formats (jsonpath, custom-columns, go-template), all major verbs (get, describe, apply, delete, exec, logs, port-forward, rollout, scale, drain), workload resources, config/storage, networking, RBAC, node management, debugging (CrashLoopBackOff, ImagePullBackOff, OOMKilled), and scripting patterns (dry-run, diff, wait, jq, kustomize). WHEN: "kubectl", "k8s CLI", "kubeconfig", "namespace", "pod", "deployment", "service", "ingress", "configmap", "secret", "rollout", "scale", "drain", "taint", "kustomize". Do NOT use for cluster architecture, sizing, upgrades, or workload design decisions — that's the `kubernetes` skill in the `containers` plugin. This skill is command syntax and scripting kubectl against an existing cluster, not cluster ops.
tools
Bash 5.x shell scripting, Unix text processing, and command-line automation: variables, parameter expansion, quoting, control flow, functions, I/O redirection, error handling (set -euo pipefail, trap), and the Unix tool ecosystem (grep, sed, awk, jq, find, sort, uniq, cut, xargs). Covers process management, networking (curl, ssh, rsync, nc), file locking (flock), parallel execution, and production script patterns. WHEN: "Bash", "bash", "shell", "sh", ".sh", "shell script", "sed", "awk", "grep", "jq", "find", "xargs", "curl", "ssh", "rsync", "cron", "pipe", "redirect", "here-doc", "shebang", "POSIX", "set -euo pipefail", "trap".
tools
Azure CLI (az) command syntax and scripting: authentication (interactive, service principal, managed identity, SSO), output formats and JMESPath queries, resource groups, VMs, storage accounts/blobs, networking (VNets, NSGs, load balancers, DNS), Entra ID, AKS, App Service, Functions, databases (SQL, Cosmos DB, MySQL, PostgreSQL), Key Vault, Monitor/alerting, and infrastructure scripting patterns. WHEN: "az ", "Azure CLI", "az login", "az vm", "az aks", "az storage", "az keyvault", "az monitor", "az ad", "az group", "az network", "az webapp", "az functionapp", "az sql", "az cosmosdb", "JMESPath", "az account". Do NOT use for Azure architecture, landing zones, or multi-subscription strategy — that's the `cloud-platforms` plugin. This skill is about command syntax and scripting the CLI, not deciding what to provision.
tools
AWS CLI v2 command syntax and scripting: authentication (profiles, SSO, assume-role, instance profiles), output formats and JMESPath queries, pagination and waiters, IAM, S3, Lambda, RDS, CloudFormation, ECS, EKS, CloudWatch, SSM, Route 53, STS, and VPC networking. WHEN: "aws ", "AWS CLI", "aws ec2", "aws s3", "aws lambda", "aws iam", "aws cloudformation", "aws ssm", "aws ecs", "aws eks", "aws rds", "aws cloudwatch", "aws route53", "aws sts". Do NOT use for AWS architecture, service selection, multi-account strategy, or FinOps — that's the `cloud-platforms` plugin. This skill is about command syntax and scripting the CLI, not deciding what to provision.