mhgbrown / cached_resource

Caching for ActiveResource
MIT License
80 stars 28 forks source link

Error when trying to fetch has_many association #39

Open ptarud opened 6 years ago

ptarud commented 6 years ago

When a cached resource is trying to fetch it has_many associations it crashed.

from /home/ptarud/.rvm/gems/ruby-2.4.0/gems/cached_resource-5.0.1/lib/cached_resource/caching.rb:91:in new' from /home/ptarud/.rvm/gems/ruby-2.4.0/gems/cached_resource-5.0.1/lib/cached_resource/caching.rb:91:inblock in cache_read' from /home/ptarud/.rvm/gems/ruby-2.4.0/gems/activesupport-5.2.0/lib/active_support/core_ext/object/try.rb:16:in try!' from /home/ptarud/.rvm/gems/ruby-2.4.0/gems/activesupport-5.2.0/lib/active_support/core_ext/object/try.rb:8:intry' from /home/ptarud/.rvm/gems/ruby-2.4.0/gems/cached_resource-5.0.1/lib/cached_resource/caching.rb:87:in cache_read' from /home/ptarud/.rvm/gems/ruby-2.4.0/gems/cached_resource-5.0.1/lib/cached_resource/caching.rb:36:infind_via_cache' from /home/ptarud/.rvm/gems/ruby-2.4.0/gems/cached_resource-5.0.1/lib/cached_resource/caching.rb:23:in find_with_cache' from /home/ptarud/.rvm/gems/ruby-2.4.0/gems/activeresource-5.0.0/lib/active_resource/associations.rb:150:inblock in defines_has_many_finder_method'

Daniel-ltw commented 6 years ago

Could you try debugging the code by putting in a binding or a debugger before line 90 in lib/cached_resource/caching.rb?

This should help you get to something and understand why it is throwing that error. From what you shared, I am not really see what error is being thrown, so I cannot make sense of why it is throwing that error.