trampek
trampek

Reputation: 31

Problem running thumbs_up gem in Rails 3

I followed the gem installation steps on https://github.com/brady8/thumbs_up but ran into an error when following the usage steps.

This is taken from my User and Comment models:

class User < ActiveRecord::Base
  <some devise specific stuff>
  acts_as_voter
end

class Comment < ActiveRecord::Base
  acts_as_voteable
end

The error I'm getting is the following:

C:/Ruby192/lib/ruby/gems/1.9.1/gems/activerecord-3.0.3/lib/active_record/base.rb:1008:in 'method_missing'Exiting : undefined local variable or method 'acts_as_voter' for # (NameError)

Removing the acts_as_voter line in User model eliminates the problem even though there is an 'acts_as_voteable' in the Comment model which seems to work fine then.

Any ideas?

Upvotes: 3

Views: 541

Answers (1)

Alex Cason
Alex Cason

Reputation: 116

I had the same issue after adding the thumbs_up gem to my application.

Restarting the server cleared it up for me.

Upvotes: 3

Related Questions