Learn how to install Rails, create your first application, and understand the basic directory structure of a Rails project.
Tutorial series
Rails Basics
8 tutorials — follow in order for the best learning path.
- Getting Started with Ruby on Rails
- The MVC Pattern in Rails
Learn how Rails implements the Model-View-Controller pattern, with a walkthrough of the request lifecycle, each layer's role, and real code examples.
- ActiveRecord Basics
Learn how ActiveRecord ORM works in Ruby on Rails. Master models, database operations, relationships, and queries to build data-driven Rails applications.
- Migrations in Rails
Learn how Rails migrations let you version-control your database schema using Ruby code. Create tables, add columns, and roll back changes safely.
- Views and Partials in Rails
Learn how Rails views render HTML, use ERB templates, and reuse code with partials and layouts. Includes practical examples for beginners.
- Active Record associations in Rails: a practical tutorial
Connect Rails models with belongs_to, has_one, has_many, has_many :through, and polymorphic associations. Includes migration tips and gotchas.
- Forms and Validations in Rails
Learn how to build forms with form_with, protect them with strong parameters, and add validations to keep your data clean.
- Routing in Rails
Learn how Rails routes HTTP requests to controllers and actions. This guide covers RESTful routes, custom routes, route constraints, and named routes.