How to run rake tasks from console?

后端 未结 5 409
南旧
南旧 2021-01-30 00:37

I want to invoke my rake task from console. Is it doable? if yes, how to do so?

I tried this on console:

require \         


        
5条回答
  •  别那么骄傲
    2021-01-30 01:19

    Just a note that if you are in the rails console via rails c you can just call/run the rake task method by irb(main):001:0> TaskClassName.new.my_task

提交回复
热议问题