Ruby on Rails is a web application framework written in Ruby.

Rails follows the “convention over configuration” approach, which means it provides a lot of default structure so you can build applications with less setup.

The main parts of a Rails application are:

  • Models, which represent application data and business rules
  • Views, which render HTML and other responses
  • Controllers, which handle requests and coordinate the response
  • Routes, which map URLs to controller actions
  • Migrations, which evolve the database schema over time

Rails is often used with:

  • PostgreSQL or another relational database
  • Hotwire or Stimulus for frontend behavior
  • Active Record for database access
  • Action View for templates
  • Action Mailer for email

Why people use it

Rails is a good fit when you want to build database-backed web apps quickly and keep the codebase organized around common conventions.

It is especially strong for:

  • CRUD applications
  • Admin tools
  • Internal business software
  • Products where delivery speed matters

Tradeoffs

Rails can feel heavy if you only need a small service, and its conventions are a better fit for teams that want to follow the framework rather than design everything from scratch.

Rule of thumb:

  • Use Rails when you want a full web framework with batteries included
  • Use a lighter framework when you only need a small API or service