# Ruby on Rails

URL: https://softwaredictionary.org/terms/ruby-on-rails
Category: Backend & APIs
Last updated: 2026-10-03
Pronunciation: ROO-bee on RAYLZ

In short: Ruby on Rails is a full-stack web framework for Ruby that favors convention over configuration, so database-backed web apps can be built quickly.

## What is Ruby on Rails?

Rails was extracted by David Heinemeier Hansson from the Basecamp project management tool and released as open source in 2004. It popularized ideas that most web frameworks later borrowed: MVC with clear folders, database migrations, an ORM built into the framework, generators that create code for you, and sensible defaults for almost everything.

Convention over configuration is its core principle. A `Book` model automatically maps to a `books` table, a `BooksController` serves `/books` routes, and its views live in `app/views/books`. Because every Rails app is laid out the same way, developers can move between projects quickly, and a lot of code never has to be written.

Active Record, the built-in ORM, lets you write `Book.where(author: "Le Guin").order(:year)` instead of SQL. Hotwire, the default front-end approach, updates pages over the wire with HTML rather than a large JavaScript framework, and tools for background jobs, email, file uploads and WebSockets are built in. GitHub, Shopify and Basecamp are well-known Rails applications.

A common misconception is that Rails can't scale. Some of the largest websites run on it; scaling problems usually come from the database and architecture rather than the framework. Its real trade-off is that productivity depends on embracing its conventions and Ruby's style.

## Key takeaways

- Rails is a full-stack Ruby web framework released in 2004.
- Convention over configuration means a standard structure and fewer decisions.
- Active Record maps models to tables; migrations version the schema.
- Generators, background jobs, mail and Hotwire come built in.
- GitHub and Shopify are large applications built on Rails.

## Example: A model, a controller and a route

```ruby
# config/routes.rb
Rails.application.routes.draw do
  resources :books, only: [:index, :show]
end

# app/models/book.rb  →  table "books"
class Book < ApplicationRecord
  validates :title, presence: true
  scope :by_author, ->(name) { where(author: name).order(:year) }
end

# app/controllers/books_controller.rb  →  views in app/views/books/
class BooksController < ApplicationController
  def index
    @books = Book.by_author(params[:author])
  end

  def show
    @book = Book.find(params[:id])
  end
end
```

## Frequently asked questions

**Is Ruby on Rails still used?**

Yes. It is actively developed and used by companies such as GitHub, Shopify and Basecamp, and it remains popular for startups that want to build quickly.

**What does convention over configuration mean?**

The framework assumes standard names and locations, such as a Book model using a books table, so you only write configuration when you need something different from the default.

**What is the difference between Ruby and Rails?**

Ruby is the programming language. Rails is a web framework written in Ruby. You can write Ruby without Rails, but Rails applications are written in Ruby.

---

Software Dictionary: https://softwaredictionary.org/ · https://softwaredictionary.org/llms.txt
