Skip to content

Instantly share code, notes, and snippets.



Last active Dec 25, 2015
What would you like to do?
Puma on Heroku
Rails.application.config.after_initialize do
ActiveSupport.on_load(:active_record) do
if Rails.application.config.database_configuration
config = Rails.application.config.database_configuration[Rails.env]
config['reaping_frequency'] = ENV['DB_REAP_FREQ'] || 10 # seconds
config['pool'] = ENV['DB_POOL'] || 5
gem 'foreman'
gem 'puma'
web: bundle exec puma -t ${PUMA_MIN_THREADS:-8}:${PUMA_MAX_THREADS:-12} -w ${PUMA_WORKERS:-2} -p $PORT -e ${RACK_ENV:-development}

This comment has been minimized.

Copy link

@joshhepworth joshhepworth commented Feb 6, 2014

How do you normally start your development server when you're using this Procfile? I've gotten in the habit of just doing foreman start web and that throws errors locally with the above Procfile because my local environment doesn't seem to support that syntax. I've tried in zsh and bash 3.2.


This comment has been minimized.

Copy link

@kivanio kivanio commented Feb 7, 2014


RACK_ENV=development foreman start

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment