Cette page est affichée en anglais. Une traduction française est en cours.
ConfigsApr 12, 2026·3 min de lecture

Ruby on Rails — Full-Stack Web Framework That Started It All

Ruby on Rails is a full-stack web framework optimized for programmer happiness. Convention over configuration, MVC architecture, ActiveRecord ORM, migrations, and scaffolding. Created by DHH in 2004 and still powering GitHub, Shopify, Basecamp, and Airbnb.

Introduction

Ruby on Rails (often just "Rails") is a full-stack web application framework written in Ruby. Created by David Heinemeier Hansson (DHH) while building Basecamp, open-sourced in 2004. Rails popularized Convention over Configuration (CoC) and Don"t Repeat Yourself (DRY) — ideas that influenced every web framework since. Powers GitHub, Shopify, Basecamp, Airbnb, Hulu, and many others.

What Rails Does

  • MVC — Model, View, Controller architecture
  • ActiveRecord — ORM with migrations, validations, associations
  • Scaffold — one-command CRUD generation
  • Routing — RESTful resource routing
  • Action View — ERB/Haml templates
  • Action Cable — WebSocket framework
  • Active Job — background job abstraction
  • Action Mailer — email sending with templates
  • Active Storage — file uploads to S3/GCS/Azure
  • Turbo + Stimulus — Hotwire for HTML-over-the-wire
  • Kamal — deploy Rails anywhere with Docker
  • Solid Queue/Cache/Cable — database-backed infrastructure

Architecture

Full MVC with an opinionated project structure. Convention over Configuration means file names, directory layouts, and naming patterns determine behavior. Asset pipeline (Propshaft/Dartsass in Rails 7+) for CSS/JS. Rails 8 introduces Solid trifecta for database-backed queues, caches, and WebSockets.

Self-Hosting

# Production (Rails 8)
KAMAL_REGISTRY_PASSWORD=xxx kamal setup
kamal deploy

# Traditional
bundle exec puma -C config/puma.rb
# Behind Nginx reverse proxy

Key Features

  • Convention over Configuration
  • ActiveRecord ORM
  • Scaffold generators
  • RESTful routing
  • Hotwire (Turbo + Stimulus)
  • Action Cable (WebSocket)
  • Active Job (background)
  • Active Storage (uploads)
  • Kamal deployer
  • Rails 8 Solid trifecta
  • Mature gem ecosystem

Comparison

Framework Language Philosophy Speed
Rails Ruby Convention > config OK
Django Python Batteries-included OK
Laravel PHP Elegant syntax OK
Phoenix Elixir Convention + speed Fast
Spring Boot Java Enterprise auto-config OK
Next.js TypeScript Full-stack React Fast

FAQ

Q: Rails performance? A: Ruby 3.3 + YJIT makes Rails 3x faster than Ruby 2.x. Shopify runs a million global merchants on Rails. Performance bottlenecks are usually in the database, not the framework.

Q: Rails 7 vs 8? A: Rails 8 introduces Solid Queue (DB-backed queue, no Redis needed), Solid Cache, and Solid Cable, simplifying deployment. Combined with the Kamal deployer, the goal is that even solo full-stack developers can deploy anywhere.

Q: What is Hotwire? A: Turbo (HTML-over-the-wire, replacing SPAs) + Stimulus (lightweight JS sprinkles) + Strada (mobile bridge). Use Rails to build full-stack apps without React or a frontend/backend split.

Sources

Discussion

Connectez-vous pour rejoindre la discussion.
Aucun commentaire pour l'instant. Soyez le premier à partager votre avis.

Actifs similaires