简体   繁体   中英

rails 3 built-in rake tasks, where are they located?

I can put my custom rake tasks in lib/tasks/ , but where are the built-in ones (ie db:migrate, db:seed, etc) stored?

I looked in: [INSTALLATION_DIRECTORY]/gems/rails-[VERSION]/lib/tasks but couldn't find that path. Maybe it matters that I'm using RVM?

I'd like to inspect their source for some inspiration.

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" find . -name "*.rake" in the gems directory to find others.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM