Intern Track Roadmap

Rails server & Puma

This course covers how a Rails app is started and served by Puma. It begins with bin/rails server and its boot output, then explains why Puma replaced WEBrick as the Rails default. It reads config/puma.rb line by line, including threads, port and plugins. It describes Puma's workers and threads, single and clustered mode, and the database connection pool. It also covers bin/dev with Foreman, the ways to restart the server, and how to clear a stale pidfile error.

What you'll learn

  • ✓Starting and stopping the Rails server with bin/rails server
  • ✓Why Puma replaced WEBrick as the Rails default server
  • ✓Reading the settings in config/puma.rb
  • ✓Puma workers, threads, and single versus clustered mode
  • ✓Running several development processes with bin/dev and Foreman
  • ✓Restarting Puma and clearing a stale pidfile
Free preview · Lesson 1 2 min read

Starting the Rails server

Rails CLI: rails new generated a whole app: models, views, controllers and config, sitting on disk. None of it does anything yet. A Rails app is just files until a process starts reading requests and running the code. That process is bin/rails server.

Read the full lesson free →

Curriculum

7 lessons
Type to start searching...