Ruby on Rails

MIT
Platform
Linux Windows macOS
Licence
MIT Open source
Ruby on Rails

Overview

Ruby on Rails is a full-stack web application framework written in Ruby and released under the MIT licence. Created by David Heinemeier Hansson and extracted from the Basecamp project, it has been developed continuously for more than two decades by a core team and more than six thousand contributors, and its current stable release is 8.1.4.1, published on 4 November 2026. Rails implements the model-view-controller pattern: Active Record holds the domain model, Action Pack routes and dispatches requests, and Action View renders the templates. Its defining idea is convention over configuration — table names, file paths and routes follow defaults, so a new application starts from a generator that already works instead of from a folder of empty configuration files.

Key Features

  • Active Record — database tables become Ruby classes, with migrations, validations, associations, scopes, callbacks and encrypted attributes, so business logic lives in rich objects rather than in scattered SQL.
  • Action Pack — a router and controllers that dispatch requests, with RESTful resource routes declared in a single line and strong parameters for mass-assignment safety.
  • Action View — ERB templates, layouts and partials render HTML, JSON and mail bodies from the same controller actions.
  • Generators and scaffolding — rails new, rails generate model and rails generate scaffold produce a working model, controller and set of views in seconds.
  • Batteries included — Action Mailer and Action Mailbox send and receive email, Active Job runs background work, Action Cable carries WebSockets, Active Storage attaches files and Action Text handles rich text, all in the default install.
  • Hotwire — Turbo and Stimulus update pages over the wire, so much of the interactivity that used to need a separate single-page application stays in server-rendered HTML.
  • Built-in tooling — bin/rails console for a live application shell, bin/rails db:migrate for schema changes, and a Minitest suite driven by bin/rails test.
  • Rails 8 defaults — Solid Queue, Solid Cache and Solid Cable keep jobs and caching in the database instead of extra services, an authentication generator writes a starting login flow, and Kamal deploys the app as a container.

Why Use Ruby on Rails?

Rails is built to keep a web product small in the head. A single application holds the routes, the database schema, the HTML templates, the background jobs and the mailers, and the conventions mean two developers who have never met can read each other’s code without a style guide. That is why Rails has carried companies from a first prototype to millions of users and billions in market value — the same framework that scaffolds a weekend idea also runs large commerce and subscription platforms. The RubyGems ecosystem supplies the missing pieces without a build step: adding a gem is a line in the Gemfile and one bundle install. Security defaults matter as much as speed — CSRF tokens, escaped output, SQL injection protection through parameterised queries, signed cookies and encrypted credentials are on from the first commit, not bolted on later. Documentation is unusually complete, with the official guides, a maintained API reference and a large body of book and video material behind it.

Use Cases

  • SaaS products and subscription businesses, where billing, authentication and background jobs are needed on day one.
  • Marketplaces and multi-tenant platforms with complex domain models.
  • Minimum viable products and startup launches that must ship quickly without a second backend team.
  • JSON APIs for mobile and front-end clients, started with rails new myapp --api.
  • Internal tools, admin dashboards and back-office systems.
  • Content-driven sites and blogs with editorial workflows.

Getting Started

Install Ruby first — the 8.x line needs Ruby 3.2 or newer — then run gem install rails. Create an application with rails new myapp, change into it and start the server with bin/rails server; opening http://localhost:3000 shows the Rails bootscreen with the exact Rails and Ruby versions in use. A new application uses SQLite by default, so no database server has to be installed before the first page renders. The official guides at guides.rubyonrails.org walk through the first application, Active Record, routing and testing, and api.rubyonrails.org documents every class. Keep an application’s configuration in config/, secrets in encrypted credentials rather than in source control, and run bin/rails test before every deploy.

Explore More Categories

Sign In

Register

Reset Password

Please enter your username or email address, you will receive a link to create a new password via email.