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)