Exécuter la tâche de râteau dans la console 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