Install it in three steps.

A line in your Gemfile, a line in your routes, a bundle install. The toolbar then appears on every HTML page you open in development.

The three steps

  1. Add the gem to your Gemfile. The library is profiler, not rails-profiler: without require: "profiler", Bundler loads nothing of the gem.
    gem "rails-profiler", require: "profiler"
  2. Mount the engine in config/routes.rb, guarded to development.
    Rails.application.routes.draw do
      mount Profiler::Engine, at: '/_profiler' if Rails.env.development?
    end
  3. Run bundle install, then start your app. The dashboard is at /_profiler.

The gem is published on RubyGems.org. The features page shows what you get, and the FAQ answers the usual questions.

Requirements

Optional gems

The profiler depends on none of these. Add the ones you use to your application's Gemfile.

stackprof
Function profiling in its default, low-overhead (lite) mode. Without it, lite mode records nothing and the Timeline tab says why.
sqlite3
config.storage = :sqlite
redis
config.storage = :redis (version 5.x)

Safety defaults

The profiler shows everything your application does (parameters, SQL, headers, logs, ENV) and can change ENV and run your tests. Its defaults keep that to you:

Docker, a VM or a remote proxy. Your browser's requests then reach Rails from a bridge or proxy address, which :allow_local refuses, and the profiler stops capturing. Admit your own network explicitly with :allow_authorized and an authorize_with block, as the gem's security documentation shows.