Commit 75fb9ee
Changed files (2)
config
config/puma_production.rb
@@ -23,7 +23,7 @@ state_path "#{rails_root}/tmp/pids/puma.state"
activate_control_app
on_worker_boot do
- require "active_record"
- ActiveRecord::Base.connection.disconnect! rescue ActiveRecord::ConnectionNotEstablished
- ActiveRecord::Base.establish_connection(YAML.load_file("#{rails_root}/config/database.yml")[rails_env])
+ # Worker specific setup for Rails 4.1+
+ # See: https://devcenter.heroku.com/articles/deploying-rails-applications-with-the-puma-web-server#on-worker-boot
+ ActiveRecord::Base.establish_connection
end
Gemfile.lock
@@ -374,4 +374,4 @@ DEPENDENCIES
web-console (~> 2.0)
BUNDLED WITH
- 1.10.1
+ 1.10.3