Forum: Ruby on Rails will_paginate & vote_fu

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
0fdce938a28a604fd5613a68b0d78fcb?d=identicon&s=25 Jose vicente Ribera pellicer (joripel)
on 2009-03-24 10:28
Hi, first at all sorry if my english is not the best.

I'm trying to include the plugin vote_fu to my aplication following
these steps http://github.com/peteonrails/vote_fu/tree/master.

I install the plugin and i run the migration. It rules perfectly:

== 20090324090130 VoteFuMigration: migrating
==================================
-- create_table(:votes, {:force=>true})
   -> 0.0801s
-- add_index(:votes, ["voter_id", "voter_type"], {:name=>"fk_voters"})
   -> 0.0404s
-- add_index(:votes, ["voteable_id", "voteable_type"],
{:name=>"fk_voteables"})
   -> 0.0359s
== 20090324090130 VoteFuMigration: migrated (0.1569s)
=========================


I want that users can vote the videos. In the models:

class Video < ActiveRecord::Base
  acts_as_voteable
end

class Usuario < ActiveRecord::Base
  acts_as_voter
end


But when i try to launch localhost it shows me this error:

NameError (undefined local variable or method `acts_as_voter' for
#<Class:0x33623bc>):
    /opt/local/lib/ruby/gems/1.8/gems/activerecord-2.1.2/lib/active_record/base.rb:1672:in
`method_missing_without_paginate'
    /vendor/plugins/will_paginate/lib/will_paginate/finder.rb:167:in
`method_missing'
    /app/models/usuario.rb:4
    /opt/local/lib/ruby/gems/1.8/gems/activesupport-2.1.2/lib/active_support/dependencies.rb:216:in
`load_without_new_constant_marking'
    /opt/local/lib/ruby/gems/1.8/gems/activesupport-2.1.2/lib/active_support/dependencies.rb:216:in
`load_file'
    /opt/local/lib/ruby/gems/1.8/gems/activesupport-2.1.2/lib/active_support/dependencies.rb:355:in
`new_constants_in'
 /opt/local/lib/ruby/gems/1.8/gems/activesupport-2.1.2/lib/active_support/dependencies.rb:215:in
`load_file'
    /opt/local/lib/ruby/gems/1.8/gems/activesupport-2.1.2/lib/active_support/dependencies.rb:96:in
`require_or_load'
    /opt/local/lib/ruby/gems/1.8/gems/activesupport-2.1.2/lib/active_support/dependencies.rb:261:in
`load_missing_constant'
    /opt/local/lib/ruby/gems/1.8/gems/activesupport-2.1.2/lib/active_support/dependencies.rb:468:in
`const_missing'
    /opt/local/lib/ruby/gems/1.8/gems/activesupport-2.1.2/lib/active_support/dependencies.rb:480:in
`const_missing'
    /opt/local/lib/ruby/gems/1.8/gems/activesupport-2.1.2/lib/active_support/dependencies.rb:486:in
`send'
    /opt/local/lib/ruby/gems/1.8/gems/activesupport-2.1.2/lib/active_support/dependencies.rb:486:in
`const_missing'
    /app/controllers/web_controller.rb:13:in `home'
.
.
.

There isn't compatibility between this two plugins??. I'm tryin to find
any solution in google, but there's  no information :((.

Anybody can help me please
0fdce938a28a604fd5613a68b0d78fcb?d=identicon&s=25 Jose vicente Ribera pellicer (joripel)
on 2009-03-24 12:43
I have reboot the server and there's no error
This topic is locked and can not be replied to.