Führen Sie die Rake -Aufgabe in Rails Console aus
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