Your problem is not the thumbs_up
gem.
Your problem is that you don't know how to schedule periodic tasks.
A tool that you can use for this is the Whenever gem. It lets you do stuff like this:
# in whenever
every 24.hours do
rake "pictures:set_fame"
end
# lib/tasks/my_task.rake
namespace :pictures do
task :set_fame => :environment do
# N.B.: I haven't had the chance to test this query.
Picture.where(fame: true).first.update_attribute(:fame, false)
Picture.order('tally DESC').first.update_attribute(:fame, true)
end
end