问题描述
我在lib / tasks的rails项目中创建cron作业
namespace :job do
desc "TODO"
task finish_job: :environment do
jobs = Job.where(end_date:Date.today())
if jobs != []
print('Found jobs!')
for job in jobs
promoter_ids_in_promoter_requests = job.promoters_requests_jobs.where(status: "accept").pluck(:promoter_id)
promoters = Promoter.where(id:promoters).update_all(is_enrolled: false)
end
else
print("No jobs!")
end
end
end
当我运行此命令bundle exec whenever --update-crontab
时
我收到此错误
NOTE: Gem::Specification#rubyforge_project= is deprecated with no replacement. It will be
removed on or after 2019-12-01.
Gem::Specification#rubyforge_project= called from
/home/omnia/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/specifications/mimemagic-
0.3.3.gemspec:16.
NOTE: Gem::Specification#rubyforge_project= is deprecated with no replacement. It will be
removed on or after 2019-12-01.
如何解决此问题?
解决方法
这些不是错误,而是弃用警告。 如果命令失败,请张贴所有错误代码。