I've been following this post to setup puma with foreman:
https://www.digitalocean.com/community/articles/how-to-set-up-zero-downtime-rails-deploys-using-puma-and-foreman
The puma script says to verify_active_connections!
after connecting but it's not available in rails 4. Commenting out the method call will make the script run but I'm not sure if this will leak resources or not.
The only documentation I can see in regards to this issue is:
https://github.com/socialcast/resque-ensure-connected/issues/3
But there's no conclusive answer on what to do. I think the options are to either omit it and rails will handle it now under the hood or do that each block that runs verify on each one. Does anyone have a real answer on what to do? Thanks.
It appears that in Rails 4 it was removed in this commit:
https://github.com/rails/rails/commit/9d1f1b1
It seems that you now should be looking at:
ActiveRecord::Base.clear_active_connections!
Here's some github issues threads that discuss it:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With