1

I created a rails 5 project and I'm trying to import a gem I made. I get the following error when i run any rake tasks from the rails project:

NoMethodError: undefined method `instantiate_observers' for ActiveResource::Base:Class

The error is coming from the gem as the project runs fine when i comment it out in the Gemfile. Seeing as instantiate_observers isn't called anywhere in the gem, I've narrowed the error source to be coming from this line:

    class BaseResource < ActiveResource::Base

Obviously I need it to inherit from ActiveResource, so I can't figure out a solution. Also, the rails-observers gem is in the gem's gemfile:

activeresource (4.1.0)
  activemodel (~> 4.0)
  activesupport (~> 4.0)
  rails-observers (~> 0.1.2)

Any insight would be greatly appreciated!

Ultimation
  • 1,059
  • 9
  • 18
  • I'm having the same issue using the master branch. Any leads or workarounds? – Nate Bird Jun 27 '16 at 15:59
  • 1
    I submitted a ticket (https://github.com/rails/activeresource/issues/221) which was promptly closed along with this commit - https://github.com/rails/activeresource/commit/6c4c02b77ea04060b02bf023d93fd0e076756427. So it seems it was just some lingering code. – Nate Bird Jun 27 '16 at 16:10
  • Nice looks like that works for me also. Thanks for doing that! – Ultimation Jun 27 '16 at 20:41

0 Answers0