How to run rails puma server with config file using 'rails s puma'

I have found that using Foreman (https://github.com/ddollar/foreman) is a nice workaround for this, and gives additional flexibility as well.

Heroku has written a nice guide for this ( https://devcenter.heroku.com/articles/deploying-rails-applications-with-the-puma-web-server ). A very quick getting started is below.

Step 1: Install Foreman. Example for Mac OS X below, full guide on the Foreman site

$ brew install foreman

Step 2: Add this to your Gemfile:

gem 'puma'

Step 3: Create a file called Procfile:

web: bundle exec puma -C config/puma.rb

Step 4: Now start your application by using

$ foreman start

00:36:05 web.1  | started with pid 19869
00:36:05 web.1  | [19869] Puma starting in cluster mode...
00:36:05 web.1  | [19869] * Version 2.11.1 (ruby 2.2.1-p85), codename: Intrepid Squirrel
00:36:05 web.1  | [19869] * Min threads: 1, max threads: 1
00:36:05 web.1  | [19869] * Environment: development
00:36:05 web.1  | [19869] * Process workers: 1
00:36:05 web.1  | [19869] * Preloading application
00:36:07 web.1  | [19869] * Listening on tcp://0.0.0.0:3000
00:36:07 web.1  | [19869] Use Ctrl-C to stop
00:36:07 web.1  | [19869] - Worker 0 (pid: 19870) booted, phase: 0

It is not possible to use rails s puma to load your puma configuration file, as confirmed here https://github.com/puma/puma/issues/512, you might want to take a look at a similar question here How do I get 'puma' to start, automatically, when I run `rails server` (like Thin does) where this is discussed