title: Rails 4: You should not use the `match` method in your router without specifying an HTTP method
body: <p>Okay, so I've upgraded to Rails 4 (kind of unplanned with my 10.9 server update) and have been able to get everything running on my photo gallery app except for the routes. For some reason I've always had trouble understanding routes since rails 3. Here was my previous working code under Rails 3  </p>
  
  <pre><code>root :to =&gt; "gallery#index", :as =&gt; "gallery"
  
  get 'gallery' =&gt; 'gallery#index'
  resources :galleries
  
  match 'gallery_:id' =&gt; 'gallery#show', :as =&gt; 'gallery'
  </code></pre>
  
  <p>I understand that match has been depreciated, but if I try to use GET, I'm getting the following error: </p>
  
  <p>Invalid route name, already in use: 'gallery' You may have defined two routes with the same name using the <code>:as</code> option, or you may be overriding a route already defined by a resource with the same naming.</p>
  
  <p>Basically, I want the root (index) to load as "/photos/gallery" as it does, and my show action to load, for example, record id 435 as: "/photos/gallery_435" which is how I previously had it working. Sorry for what is probably a simple question, I just cannot seem to grasp the rails routing.</p>