Ruby on Rails
A full-stack, convention-over-configuration web framework for Ruby that popularized rapid, opinionated web development and the model-view-controller pattern on the server.
Created by David Heinemeier Hansson
Ruby on Rails — usually shortened to Rails — is a server-side web application framework written in the Ruby programming language. It implements the model-view-controller (MVC) architectural pattern and bundles everything a developer needs to build a database-backed web application: an object-relational mapper, a templating system, a routing layer, a mailer, a test framework, and tooling for asset management and background work. More than a library, Rails is a complete, opinionated stack that shaped how a generation of web applications was built.
When it appeared in 2004, Rails became famous for the speed with which a working application could be assembled. Its philosophy of sensible defaults and minimal boilerplate made it a touchstone for “productive” web development, and its influence rippled outward into frameworks written in PHP, Groovy, Elixir, and C#.
History and Origins
Rails was created by Danish programmer David Heinemeier Hansson (widely known as DHH) while he was building Basecamp, a project-management application for the company 37signals. Rather than writing Basecamp on top of an existing framework, Hansson developed the web-application infrastructure he needed in Ruby, then extracted that infrastructure into a standalone framework. He released it publicly in July 2004.
The framework gained momentum quickly. The release of Rails 1.0 in December 2005, paired with a now-legendary screencast in which Hansson built a functioning blog application in just a few minutes, captured the imagination of web developers frustrated by the heavyweight, configuration-laden frameworks common at the time. Rails offered a striking contrast: write less code, follow the conventions, and watch a working application take shape.
The “first appearance” of Rails is dated to its initial public release in July 2004. Because it was extracted from an existing application rather than designed from scratch, some of its ideas were in use inside Basecamp slightly earlier.
Design Philosophy
Two principles sit at the heart of Rails and explain much of its appeal:
Convention over Configuration (CoC) — Rails makes assumptions about how things should be named and organized so that developers do not have to specify them explicitly. A model class named
Ordermaps automatically to a database table namedorders; a controller’sshowaction automatically renders ashowtemplate. By following the conventions, a developer writes dramatically less configuration code.Don’t Repeat Yourself (DRY) — Rails encourages expressing each piece of knowledge in exactly one place. Its components are designed so that information defined once (such as a database schema or a route) does not need to be restated elsewhere.
A third, less formal value is what Hansson called optimizing for programmer happiness — a philosophy inherited directly from Ruby itself. Rails aims to make common tasks pleasant and concise, even at the occasional cost of raw flexibility. This opinionated stance is deliberate: Rails has a preferred way of doing things, and developers who work with the grain of the framework are rewarded with productivity.
Key Features
Rails is composed of several major sub-frameworks that work together:
| Component | Responsibility |
|---|---|
| Active Record | Object-relational mapping (ORM) between Ruby objects and database tables |
| Action View | Templating and rendering of HTML and other response formats |
| Action Controller | Handling requests, orchestrating the response, and managing sessions |
| Action Mailer | Composing and sending email |
| Active Job | A common interface for background and queued work |
| Action Cable | Real-time features over WebSockets |
| Active Storage | File uploads and attachment to models |
| Action Text / Action Mailbox | Rich text content and inbound email processing |
Other defining capabilities include:
- Migrations — versioned, reversible Ruby scripts that evolve the database schema over time.
- Scaffolding and generators — command-line tools that produce models, controllers, views, and tests from a single command.
- Asset and front-end integration — over the years Rails has supported the asset pipeline, Webpacker, and more recently import maps and Hotwire (Turbo and Stimulus) for building interactive interfaces with less JavaScript build tooling.
- A batteries-included test framework and strong conventions around testing.
Evolution
Rails has evolved substantially across its major versions while keeping its core philosophy intact:
- Rails 2.0 (2007) standardized RESTful routing.
- Rails 3.0 (2010) was a landmark release that merged with the Merb framework, rebuilt the router and Active Record query interface, and adopted Bundler for dependency management.
- Rails 4.0 (2013) introduced Turbolinks, strong parameters for mass-assignment safety, and improved caching.
- Rails 5.0 (2016) added Action Cable for WebSockets and an API-only mode for applications that serve JSON to separate front ends.
- Rails 6.0 (2019) brought Action Text, Action Mailbox, and parallel testing.
- Rails 7.0 (2021) made Hotwire the default approach to front-end interactivity and embraced import maps to reduce reliance on Node-based build tooling.
- Rails 8.0 (2024) focused on simplifying deployment with Kamal and introduced the “Solid” trio (Solid Queue, Solid Cache, Solid Cable), reducing the number of external services a typical application needs.
The framework continues a steady maintenance cadence, with the 8.1 series reaching its 8.1.3 patch release in March 2026. Each minor series receives roughly one year of bug fixes and two years of security fixes from its first release.
Current Relevance
Two decades after its debut, Rails remains a productive and actively developed choice for building web applications, particularly for startups and product teams that value speed of iteration. It powers some of the most heavily trafficked applications on the web — including GitHub, Shopify, and GitLab — demonstrating that a well-architected Rails monolith can scale to very large workloads.
The framework’s recent direction, championed by 37signals, has pushed back against the complexity of modern front-end build pipelines and cloud deployment, favoring approaches that let small teams run capable applications with fewer moving parts. This “majestic monolith” and simplified-deployment narrative has given Rails renewed cultural relevance in an era often dominated by microservices and heavy JavaScript toolchains.
Why It Matters
Ruby on Rails is one of the most influential web frameworks ever created. It did not invent the MVC pattern or convention over configuration, but it combined them into a coherent, productive whole that reset expectations for what web development could feel like. The frameworks that followed — CakePHP and Laravel in PHP, Grails in Groovy, ASP.NET MVC in the .NET world, and Phoenix in Elixir — all absorbed ideas that Rails either originated or popularized. (Python’s Django emerged in the same era but was developed independently rather than as a descendant of Rails.)
Beyond its technical legacy, Rails helped define the modern startup playbook: a small team, an opinionated stack, and a relentless focus on shipping. Its enduring tagline — that developers should be optimizing for happiness and convention — continues to shape how the industry thinks about the trade-off between flexibility and productivity.
Timeline
Notable Uses & Legacy
Basecamp (37signals)
The project-management product from which Rails was originally extracted; 37signals continues to build its products on Rails and stewards much of the framework's direction.
GitHub
The code-hosting platform was built on Ruby on Rails and remains one of the largest and longest-running Rails applications in production.
Shopify
The e-commerce platform runs one of the world's largest Rails monoliths, serving millions of merchants and handling very high traffic during peak shopping events.
GitLab
The DevOps platform for source control, CI/CD, and project management is built primarily with Ruby on Rails.
Airbnb
The lodging marketplace was originally built on Ruby on Rails during its early growth before evolving into a more service-oriented architecture.
Square (Block)
Parts of the payments company's web applications were built using Ruby on Rails, particularly in its earlier product development.
Language Influence
Influenced By
Influenced
Running Today
Run examples using the official Docker image:
docker pull ruby:3.4-slimExample usage:
docker run --rm -v $(pwd):/app -w /app ruby:3.4-slim sh -c 'gem install rails && rails --version'