Rails 3内置Rake任务,他们在哪里?
-
15-11-2019 - |
题
我可以将我的自定义佣金任务放在lib/tasks/
中,但内置的耙子任务(即db:migrate,db:seed等)存储在哪里?
我看了:[INSTALLATION_DIRECTORY]/gems/rails-[VERSION]/lib/tasks
但找不到该路径。也许我正在使用rvm?
我想检查他们的来源是否有一些灵感。
解决方案
Have a look at /activerecord/lib/active_record/railties/databases.rake for the database related rake tasks. All the other rake tasks are also present in *.rake files, so you can run a find . -name "*.rake"
in the gems directory to find others.
不隶属于 StackOverflow