
Rails
Full-stack Ruby framework with built-in ORM, mailer, and WebSockets.
Replaces —

Who it's for
Rails provides the full infrastructure for a SaaS product: database models, mailer, background jobs, file uploads, and WebSockets, all configured to work together. Teams ship the first version of a product faster than assembling equivalent functionality from individual libraries.
Your team is primarily building stateless microservices or gRPC-only backends where the HTTP layer, mailer, and template engine would go unused. Rails is designed for applications that use most of its built-in components.
Rails' Active Record layer makes it straightforward to model data relationships from spreadsheets or SQL databases, then expose them through a web interface. The framework's scaffold generator creates working CRUD views from a schema in minutes, giving a usable prototype without custom HTML or SQL.
The existing data lives in a third-party API or a NoSQL store with a schema that does not map to relational tables. Active Record works best with SQL databases.
Rails ships an API-only mode (`rails new --api`) that omits the view layer and browser-related middleware, keeping just the routing, controllers, Active Record, and Active Job. The resulting stack handles authentication, serialization, and background processing without the HTML template overhead.
Your service is a pure data-streaming endpoint or a protocol buffer service. API-only Rails is well-suited for JSON REST APIs but adds friction compared to lighter frameworks for non-HTTP transports.
The problem
Building a web application from scratch means choosing and wiring together a database library, a routing layer, an HTML template engine, a mailer, a background job system, and a WebSocket server. Each library has its own conventions, and integrating them without security gaps or inconsistency takes weeks of setup before any user-facing feature ships. The pain compounds when teams grow: every developer brings different preferences for how these pieces fit together, so a codebase without enforced conventions drifts toward an inconsistent structure. Commercial platforms handle this by abstracting the full stack behind a visual interface, but that tradeoff costs developers code-level control and flexibility.
How it works
Database tables become Ruby objects with associations, validations, callbacks, and query scopes built in. A `belongs_to :author` declaration generates the join query automatically. Rich text encryption, enum fields, and partial indexes are part of the ORM layer, not separate libraries to configure.
Action Dispatch routes URLs to controller classes and exposes bundles of actions as resources. The router's domain language maps `resources :articles` to the full set of CRUD routes in one line. Controllers handle incoming parameters, set caching headers, and respond with HTML or JSON.
Real-time features like live notifications and collaborative editing are built into the framework through Action Cable. It integrates with the job queue and the database layer, so a WebSocket channel can broadcast from anywhere in the application, including from an Active Record callback after a record is saved.
Background jobs and file uploads are first-class framework concerns rather than third-party add-ons. Active Job provides a common interface that works with Solid Queue, Sidekiq, Resque, and other backends. Active Storage attaches files to records and delivers them from S3, GCS, Azure, or local disk with the same API.
Rails ships with security protections for common web attacks as part of its default configuration. The framework is maintained with security advisories and CVE patches through the official Rails security process, with backports to all supported versions. Teams inherit these defaults without auditing and configuring a separate security middleware stack.
Features
- Active Record ORM
- MVC routing and controllers
- Action Cable WebSocket integration
- Active Storage and Active Job
- Security protections included by default
How to install
Install Rails from RubyGems and generate a new application with these commands.
gem install rails
rails new myapp
cd myapp
bin/rails serverRecommended for this setup
Strengths
- MIT license with full commercial use: MIT means you can run Rails on your infrastructure, modify it, and ship it commercially with no licensing fees and no seat counts. Unlike commercial frameworks that charge per developer or per deployment, the only costs are infrastructure and developer time.
- Active, long-maintained codebase: Rails has been in active development since 2004, with the rails/rails repository at over 59,000 stars and contributions from more than 6,000 developers. The release cadence is regular, with security patches backported to supported versions. A framework this old with this level of activity has had most common patterns and edge cases addressed in the core.
- Convention-first architecture reduces decision fatigue: The framework makes the common choices for you: file locations, naming patterns, database column conventions, and URL structure all follow documented conventions. Teams spend less time debating architecture and more time building product, which is a concrete advantage in early-stage development.
- Full-stack coverage in one library: Rails ships with everything needed to build a production web application without selecting separate libraries for each concern. Active Record, Action Controller, Action View, Action Mailer, Action Cable, Active Storage, and Active Job all ship together, configured to work as a coherent stack.
Trade-offs
- Ruby performance ceiling for CPU-intensive work: Ruby is slower than compiled languages like Go, Rust, or Java for CPU-intensive operations. Rails applications under sustained high concurrency may require more horizontal scaling than equivalent Go or Java services. For standard web workloads that are primarily I/O-bound (database queries, network calls), the performance characteristics are adequate, but compute-intensive processing is better suited to a compiled language.
- Full framework weight for simple services: Loading the full Rails stack for a minimal API or background worker brings in dependencies and startup time that lighter frameworks like Sinatra or Roda avoid. If your service does not need Active Record, Action Mailer, or Action Cable, the full framework adds overhead without benefit. The API-only mode (`rails new --api`) reduces the footprint but still carries more than a minimal Ruby HTTP library.
- 486 open issues at time of writing: The rails/rails repository carried 486 open issues at the time this was written (pull requests excluded). Most are open improvement discussions or edge-case reports rather than breaking bugs, but the number reflects the complexity of maintaining a framework that covers this much ground. Active maintenance continues with commits as recent as November 6, 2026.
Tech stack
FAQ
Yes. The rails/rails repository had its most recent commit on November 6, 2026, and version 8.1.4.1 was released on November 4, 2026. Security patches are backported to supported releases and announced through the official Rails security process. The project has over 6,000 contributors.
Rails works with any SQL database supported by its Active Record layer, including PostgreSQL, MySQL, and SQLite. The getting started guides use SQLite3 for development; production applications commonly use PostgreSQL. Active Record generates migrations, runs queries, and manages schema for whichever database you configure.
Yes. The `rails new --api` flag generates a Rails application without the view layer and browser-related middleware. The resulting stack handles routing, controllers, Active Record, and Active Job without loading the HTML template engine or cookie-based session middleware. This is a documented and officially supported mode.
Yes. Rails is released under the MIT license, which allows commercial use, modification, and distribution without restriction. You can ship a commercial SaaS product, run Rails on client infrastructure, or fork the framework itself, all without licensing fees or attribution requirements beyond preserving the MIT license notice.
Yes. Action Cable, included in Rails, integrates WebSockets with the framework's routing and database layer. A channel class handles connections and broadcasts, and the same job queue that processes background work can trigger WebSocket broadcasts. The website's example code shows a real-time delivery job attached to an Active Record model callback.