- A Modern, Concurrent Web Server for Ruby - Puma
- puma/puma · GitHub
- @ctshryock | Running Rails with Puma on Heroku
- Better Performance On Heroku: Thin vs. Unicorn vs. Puma - Ylan Segal - on.code && such
vi Gemfile
gem 'puma'
bundle install
rails s puma
vi Procfile
web: bundle exec puma -p $PORT -e $RACK_ENV -C config/puma.rb
vi config/environments/production.rb
# For Puma
config.threadsafe!
vi config/puma.rb
require "active_record"
cwd = File.dirname(__FILE__)+"/.."
ActiveRecord::Base.connection.disconnect! rescue ActiveRecord::ConnectionNotEstablished
ActiveRecord::Base.establish_connection(ENV["DATABASE_URL"] || YAML.load_file("#{cwd}/config/database.yml")[ENV["RACK_ENV"]])
ActiveRecord::Base.verify_active_connections!
- NewRelic
heroku config:add NEWRELIC_DISPATCHER=Puma