title: Matching and Routes in Rails
body: <p>I generated a controller and changed the routes but opening the links yields errors on my local server.</p>
  
  <p><strong>Generating controller and routes</strong></p>
  
  <pre><code>rails generate controller StaticPages home about team contact
  </code></pre>
  
  <p><strong>Change routes.rb</strong></p>
  
  <pre><code>MyApp::Application.routes.draw do
    root to: 'static_pages#home'
  
    match '/about',    to: 'static_pages#about'
    match '/team',     to: 'static_pages#team'
    match '/contact',  to: 'static_pages#contact'
  end
  </code></pre>
  
  <p>The root path work but none of the 'about, 'team', or 'contact' links work. This is the error I get: </p>
  
  <p>"You should not use the <code>match</code> method in your router without specifying an HTTP method. If you want to expose your action to both GET and POST, add <code>via: [:get, :post]</code> option. If you want to expose your action to GET, use <code>get</code> in the router: Instead of: match "controller#action" Do: get "controller#action""</p>
  
  <p>Why can't I use 'match'?</p>