Ruby on Rails

Build products quickly with Ruby and Rails' convention-over-configuration approach.

Beginner · about 40 hours · difficulty 2/5

Learn first: HTTP in Depth

Ruby is a expressive language designed for developer happiness, and Ruby on Rails is the framework that popularized conventions many others copied: MVC structure, migrations, an ActiveRecord ORM and generators. Startups and companies like Shopify and GitHub have run large Rails codebases.

What to learn

  • Ruby basics: blocks, iterators, symbols, modules, and its object model where everything is an object.
  • Bundler and gems for dependencies.
  • Rails: routing, controllers, ActiveRecord models, associations, validations, migrations and Active Job for background work.
  • API-only mode (rails new app --api) if you are building a JSON backend.

Why teams pick it

Very high productivity for CRUD-heavy products. Following the conventions means a new developer can find their way around any Rails app.

Pitfalls

  • N+1 queries hidden behind ActiveRecord associations; learn includes early.
  • "Fat models" that grow into thousands of lines. Extract service objects when logic gets complex.

You are ready to move on when you can build a Rails API with associations, validations, background jobs and request specs.

Key concepts

  • Ruby language basics
  • Bundler and gems
  • Rails MVC and routing
  • ActiveRecord
  • Active Job and Sidekiq
  • RSpec

Other options for this step

Mini project

Build a Rails API-only app for a book club with users, books and reviews, including eager loading to avoid N+1 queries.

Check yourself

What does Rails' includes method do, and what problem does it prevent?

Free resources