Rails how to run rake task

前端 未结 6 1353
傲寒
傲寒 2020-12-23 15:30

How do I run this rake file in terminal/console?

my statistik.rake in lib/tasks

desc \"Importer statistikker\"
namespace :reklamer do
  task :iqmedie         


        
6条回答
  •  渐次进展
    2020-12-23 16:32

    If you aren't sure how to run a rake task, first find out first what tasks you have and it will also list the commands to run the tasks.

    Run rake --tasks on the terminal.

    It will list the tasks like the following:

    rake gobble:dev:prime             
    rake gobble:dev:reset_number_of_kits                                    
    rake gobble:dev:scrub_prod_data
    

    You can then run your task with: rake gobble:dev:prime as listed.

提交回复
热议问题