Problem running thumbs_up gem in Rails 3

I followed the steps to install gem at https://github.com/brady8/thumbs_up , but encountered an error while 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 am 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' act_as_voter ' for # ( NameError)

Removing the act_as_voter line in the user model fixes the problem, even if the comment model has “act_as_voteable”, which seems to work fine.

Any ideas?

+3
source share
1

thumbs_up gem.

.

+3

Source: https://habr.com/ru/post/1790564/


All Articles