Will_paginate & vote_fu


#1

Hola, estamos intentando incluir un sistema de votaciones para los
videos de nuestra web. Para ello hemos incluido el plugin vote_fu

http://github.com/peteonrails/vote_fu/tree/master.

Instalamos el plugin y realizamos la migracion:

== 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)

Queremso qeu los usuarios puedan votar los videos:

class Video < ActiveRecord::Base
acts_as_voteable
end

class Usuario < ActiveRecord::Base
acts_as_voter
end

Cuando intento arrancar el localhost, tan solo habiendo escrito el
codigo de arriba me sale el siguiente 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:inmethod_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:inload_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:innew_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:inrequire_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:inconst_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:insend’
/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:inhome’
.
.
.

He intentado buscar por google, pero tan solo he podido encontrar a un
brasileño en el google talks que le sucedia lo mismo. Alguien ha
implementado este plugin junto al will paginate con exito??. Cualquier
ayuda sera agradecida.

Un saludo


#2

Parece que era cosa de reiniciar el servidor, ahora ya no sale ningun
error.