Here’s a basic pattern for running Sinatra with Puma.

config.ru

1
2
require './app'
run Sinatra::Application

Gemfile

1
2
gem "sinatra"
gem "puma"

app.rb

1
2
3
4
...
require 'sinatra'
configure { set :server, :puma }
...

The next time that you run ruby app.rb, it will use Puma instead of WebBrick.

Comments