Hello,
I have a custom task_scheduler.rb file in RAILS_ROOT/configuration/
initializers.
It fails because I think that it doesn't know where to find my
Category model.
Do you know how I can load or have available the resources/environment
that myrails app uses into this script?
Thanks,
Frank
task_scheduler.rb
=======================
require 'rss'
require 'rubyful_soup'
require 'tmail'
require 'rufus/scheduler'
scheduler = Rufus::Scheduler.start_new
scheduler.every("1m") do
@categories = Category.find(:all)
for category in @categories
rebuild_category_rss_data(category.id)
end
end
================
--
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.