I made a little Sinatra app. In my Gemfile add gem 'puma'
in the production group
group :production do
gem 'puma'
gem 'dm-postgres-adapter'
end
And I set production mode in config.ru
set :environment, :production
But after I run backup
, the default webrick web server run instead.
How can I solve this?
Just use puma :)
$ puma config.ru
You can run your Sinatra application with Puma from the command line like this:
$ ruby app.rb -s Puma
Or you can configure your application to always use Puma:
require 'sinatra'
configure { set :server, :puma }
You can pass it as an option to rackup:
$ rackup -s Puma
Alternatively, you can modify your config.ru to choose Puma by default, by adding the following as the first line:
#\ -s puma