rails/rails
Ruby on Rails
Ruby on Rails is a full-stack web application framework that follows the Model-View-Controller (MVC) pattern. It provides everything needed to build database-backed web applications, from an ORM and a router to mailers, background jobs, WebSockets, file storage, and a CLI for generating new apps.
This wiki documents the source of the framework itself (the rails/rails monorepo), not the API for application developers. For application-level docs, see the Rails Guides and API documentation.
What lives in this repo
The repo is a monorepo of 12 independently-published Ruby gems. Each component has its own directory at the root and can be used outside Rails:
| Component | Directory | One-line purpose |
|---|---|---|
| Active Support | activesupport/ |
Ruby core extensions, utilities, and infrastructure used by every other component |
| Active Model | activemodel/ |
Model interfaces (validations, callbacks, dirty tracking) without database dependence |
| Active Record | activerecord/ |
ORM and database abstraction layer |
| Action Pack | actionpack/ |
Routing, controllers, and HTTP request/response handling (Action Controller + Action Dispatch) |
| Action View | actionview/ |
Template rendering, ERB, and view helpers |
| Action Mailer | actionmailer/ |
Generating and sending email |
| Action Mailbox | actionmailbox/ |
Receiving and routing inbound email |
| Active Job | activejob/ |
Background job abstraction with pluggable queue adapters |
| Action Cable | actioncable/ |
WebSocket integration |
| Active Storage | activestorage/ |
File uploads to local disk or cloud storage |
| Action Text | actiontext/ |
Rich text content (Trix-backed) |
| Railties | railties/ |
The rails CLI, generators, application boot, and the glue that wires components together |
The top-level rails gem (defined in rails.gemspec) simply depends on all 12 components at the same version.
Reading this wiki
If you're new to the codebase, start here:
- Architecture — how the components fit together, the request lifecycle, and the boot process.
- Getting started — clone, bootstrap, and run the test suite.
- Glossary — the vocabulary used across the codebase.
- Packages — drill into any single component.
- How to contribute — workflow, testing, and conventions for sending PRs.
Project facts
- Current version (
RAILS_VERSIONonmain): 8.2.0.alpha - Required Ruby version: >= 3.3.1 (
rails.gemspec) - License: MIT (see
MIT-LICENSE) - First commit: November 24, 2004 (over 20 years of history; see lore)
- Total commits on
main: ~97,500 - Test framework: Minitest (Rails does not use RSpec)
- Code style: RuboCop (see
.rubocop.yml)
Where to look first
| If you want to... | Start in |
|---|---|
| Understand how a request becomes a response | features/request-lifecycle |
Understand how the rails CLI works |
packages/railties |
| Find a model callback or validation | packages/active-model and packages/active-record |
| Add a database adapter | activerecord/lib/active_record/connection_adapters/ |
| Add a queue adapter for background jobs | activejob/lib/active_job/queue_adapters/ |
| Add a storage backend for uploads | activestorage/lib/active_storage/service/ |
| Run tests for one component | how-to-contribute/testing |
External links
- Project home: https://rubyonrails.org
- Issue tracker: https://github.com/rails/rails/issues
- Contributing guide:
CONTRIBUTING.md - Code of conduct:
CODE_OF_CONDUCT.md - Release process:
RELEASING_RAILS.md
Built by Factory AutoWiki from public repository content. It is a generated preview for codebase exploration, not source-maintained documentation.