Take a look at some of the Rake tasks that Rails gives you (rake -T within a Rails project)
Find the code that defines the rake stats task in the Rails gems
What are some ways how a Rake task can execute another task?
What does it mean if a Rake task "depends" on another task? E.g. understand what it means for a Rake task within a Rails app to depend on :environment.
Understand that Capistrano tasks are also defined using the Rake DSL, but a Capistrano task is not automatically a Rake task and vice versa.
Exercises
Write a Rake task rake list_app_files that lists all Ruby files and their file size within the app directory.
Hint: Use globbing to find those files (Dir.glob(File.join('root_directory', '**', '*.rb')))