title: What does "rake routes" actually do?
body: <p>In a fresh(ish) rails project, the <code>Rakefile</code> looks like this:</p>
  
  <pre><code># Add your own tasks in files placed in lib/tasks ending in .rake,
  # for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
  
  require File.expand_path('../config/application', __FILE__)
  
  Blog::Application.load_tasks
  </code></pre>
  
  <p>Yet <code>rake routes</code> produces the following output:</p>
  
  <pre><code>cpe-74-72-73-47:rails-blog-example djechlin$ rake routes
  home_index GET /home/index(.:format) home#index
        root     /                     home#index
  </code></pre>
  
  <p>I don't understand how <code>rake</code> works so that it can get to the routes file or the routes task. Per the <a href="https://github.com/jimweirich/rake/blob/master/doc/command_line_usage.rdoc" rel="nofollow">command line usage</a> documentation, <code>rake</code> is invoked as</p>
  
  <pre><code>rake [options ...]  [VAR=VALUE ...]  [targets ...]
  </code></pre>
  
  <p>But the page has no explanation of what the targets are. I assume <code>rake</code> is called directly on the <code>routes.rb</code> file from this and that <code>Rakefile</code> is not related, but I can't confirm this at all.</p>