Will Jessop

Results 28 comments of Will Jessop

Relevant notes and patch: https://www.ruby-forum.com/topic/4510270 https://gist.github.com/mislav/a18b9d7f0dc5b9efc162

@Anoop1989 Yeah, it was a while ago and a different client, but I believe we monkey patched the behaviour in. It was a massive PITA finding the problem though, and...

I've just hit this issue after upgrading someone to Rails 5.2: ``` Message from application: undefined method `clear' for nil:NilClass (NoMethodError) /.bundle/gems/activerecord-5.2.4.3/lib/active_record/connection_adapters/abstract/connection_pool.rb:780:in `block in with_new_connections_blocked' /usr/local/lib/ruby/2.4.0/monitor.rb:214:in `mon_synchronize' /.bundle/gems/activerecord-5.2.4.3/lib/active_record/connection_adapters/abstract/connection_pool.rb:776:in `ensure in...

Thanks for the reply @botandrose! I found some `around` that looked like it might be the culprit: ```ruby config.around(:each) do |example| if example.metadata[:bypass_cleaner] example.run else DatabaseCleaner.cleaning do example.run end end...

Just hit this again looking to upgrade to 1.6. A changelog would make it a whole lot easier to upgrade!

OK, more weirdness. This Ruby: ```ruby ActiveRecord::Base.on_slave { UserActivity.where("id > 2003") } ``` runs on the primary and returns the correct data, whereas this ruby: ```ruby => ActiveRecord::Base.on_slave { UserActivity.where("id...

Thanks for the reply @grosser! I don't really understand why using a scope would prevent `.on_slave` from working, does that mean you can't use any conditions at all except on...

@rex-remind101 Are you able to test this? This was so long ago for me I don't remember what the context was.