Ruby on Rails is a web application framework for database-backed sites and APIs following Model-View-Controller. It bundles routing, ORM, views, jobs, mail, storage, and WebSockets.
Overview
Rails gives developers a single stack for building modern web applications in Ruby. Incoming HTTP requests pass through Action Dispatch routing to controllers, which load Active Record models and render Action View templates or other response formats such as JSON.
Active Record maps database tables to Ruby objects with associations, validations, callbacks, and query interfaces. Most apps use HTML templates with embedded Ruby, but the stack also supports mailers, inbound email, background jobs, Action Cable channels, file attachments, rich text, and security helpers.
Individual components such as Active Model and Action Pack can be used outside a full Rails app, but the framework’s value is convention over configuration: generators and predictable folder layout speed new projects and give automated tools consistent structure to follow.
You install the gem, generate an application, and run the built-in web server for development. Production deployment is left to the host environment, with Rails handling application code and integrations rather than packaged end-user hosting.
Key features
- Model-View-Controller application structure
- Active Record database modeling
- Action View HTML and JSON rendering
- RESTful routing with resources
- Active Job asynchronous work
- Action Mailer and Action Mailbox
- Active Storage file attachments
- Action Cable WebSocket integration
Use cases
- Full-stack CRUD web applications
- JSON APIs backed by SQL databases
- SaaS products with mail and background jobs
- Realtime features over WebSockets
- Rapid prototypes with generators