我正在测试 Iron worker(以前是简单的 worker),它无法在 Heroku 上的 Rails 应用程序中识别活动记录类名称。您可以在下面找到“AdImpression”,它是类名。
Iron worker 支持网站上的文档说我可以自由使用活动记录对象,但不知何故对我来说并非如此。
任何的想法?
/mnt/sw_jobs/u17501/user_dir/daily_ad_campaign_counter_worker.rb:56:in `insert_data_on_specific_date': uninitialized constant DailyAdCampaignCounterWorker::AdImpression (NameError)
from /mnt/sw_jobs/u17501/user_dir/daily_ad_campaign_counter_worker.rb:13:in `run'
from /mnt/sw_jobs/u17501/user_dir/runner.rb:337:in `<main>'
job_data={"class_name"=>"DailyAdCampaignCounterWorker", "attr_encoded"=>"e30=\n", "file_name"=>"daily_ad_campaign_counter_worker.rb", "rails"=>{"env"=>"development", "version"=>"3.1.1"}, "sw_config"=>{"token"=>"Yd8Q6Nyobw2Ms7UQ93ZpNCcKUX4", "project_id"=>"4ef49d8acea6fe6ea30007ef", "database"=>{"adapter"=>"mysql2", "username"=>"XXXXXX", "port"=>3306, "host"=>"XXXXxx", "password"=>"aXXXXX", "database"=>"XXXXXX"}, "global_attributes"=>{}}}
I, [2011-12-27T10:36:30.980685 #11059] INFO -- : IronWorker initialized.
Starting DailyAdCampaignCounterWorker 2011-12-27 10:36:30 +0000