bdurand / seamless_database_pool

Add support for master/slave database clusters in ActiveRecord to improve performance.
http://rdoc.info/projects/bdurand/seamless_database_pool
MIT License
224 stars 58 forks source link

Rails 4/Ruby 2 support #16

Closed t27duck closed 11 years ago

t27duck commented 11 years ago

For us at least, this fixes issue #15 in regards to Rails 4 and Ruby 2.0 support for this gem. I honestly have no idea why moving those two lines above the super call works, but for some reason after super is called master_connection and read_connections both become nil. When this happens, the error in #15 occurs. Moving the assignment above the super call somehow fixes it.

I'm not sure if this is caused by a change in Rails 4 or in Ruby 2.0 though.