Ejecutar la tarea de rastrillo en la consola Rails
require 'rake'
Rails.application.load_tasks # <-- MISSING LINE
Rake::Task['my_task'].invoke
TalaatMagdy
require 'rake'
Rails.application.load_tasks # <-- MISSING LINE
Rake::Task['my_task'].invoke
rails raketaskname:task