title: 'No route matches' Error on Delete of Micropost in Chapter 11 of Hartl's ruby-on-rails tutorial - completely stumped
body: <p>I am trying to track down a particularly elusive bug in working through Michael Hartl's ROR Tutorial.  </p>
  
  <p>When clicking on 'Delete' for a micropost (from the home page or the user/show page) the url is <a href="http://localhost:3000/microposts/303" rel="nofollow">http://localhost:3000/microposts/303</a>, but the result is "Routing Error - No route matches"/microposts/303".  </p>
  
  <p>I have gone through each page of my code that is involved and replaced them with code from Hartl's gitHub project site.  <a href="https://github.com/railstutorial/sample_app" rel="nofollow">https://github.com/railstutorial/sample_app</a>.  For example, for the microposts_controller, I copied the code from the gitHub depot and replaced my code with the copied code.  I then restarted the server.  Same result.  I then reverted back to my code to test the next page.</p>
  
  <p>The pages I swapped the code with are</p>
  
  <p>CONTROLLERS
  microposts_controller
  users_controller (show method)</p>
  
  <p>MODEL
  micropost.rb (model)</p>
  
  <p>VIEWS
  microposts/_micropost.haml
  shared/_micropost_form.html.haml
  shared/_feed.haml
  shared/_feed_item.haml</p>
  
  <p>and the Routes file.</p>
  
  <p>I am at a loss for other things to check.  Does anyone have any suggestions?</p>
  
  <p>Thanks,</p>
  
  <p>Dave</p>
  
  <p>The results of rake routes</p>
  
  <pre><code> sessions POST   /sessions(.:format)       {:action=&gt;"create", :controller=&gt;"sessions"}
  new_session GET    /sessions/new(.:format)   {:action=&gt;"new", :controller=&gt;"sessions"}
      session DELETE /sessions/:id(.:format)   {:action=&gt;"destroy", :controller=&gt;"sessions"}
       signin        /signin(.:format)         {:controller=&gt;"sessions", :action=&gt;"new"}
      signout        /signout(.:format)        {:controller=&gt;"sessions", :action=&gt;"destroy"}
   microposts POST   /microposts(.:format)     {:action=&gt;"create", :controller=&gt;"microposts"}
    micropost DELETE /microposts/:id(.:format) {:action=&gt;"destroy", :controller=&gt;"microposts"}
         root        /(.:format)               {:controller=&gt;"pages", :action=&gt;"home"}
      contact        /contact(.:format)        {:controller=&gt;"pages", :action=&gt;"contact"}
        about        /about(.:format)          {:controller=&gt;"pages", :action=&gt;"about"}
         help        /help(.:format)           {:controller=&gt;"pages", :action=&gt;"help"}
       signup        /signup(.:format)         {:controller=&gt;"users", :action=&gt;"new"}
  development        /development(.:format)    {:controller=&gt;"pages", :action=&gt;"development"}
                     /signup(.:format)         {:controller=&gt;"users", :action=&gt;"new"}
        users GET    /users(.:format)          {:action=&gt;"index", :controller=&gt;"users"}
              POST   /users(.:format)          {:action=&gt;"create", :controller=&gt;"users"}
     new_user GET    /users/new(.:format)      {:action=&gt;"new", :controller=&gt;"users"}
    edit_user GET    /users/:id/edit(.:format) {:action=&gt;"edit", :controller=&gt;"users"}
         user GET    /users/:id(.:format)      {:action=&gt;"show", :controller=&gt;"users"}
              PUT    /users/:id(.:format)      {:action=&gt;"update", :controller=&gt;"users"}
              DELETE /users/:id(.:format)      {:action=&gt;"destroy", :controller=&gt;"users"}
  </code></pre>
  
  <p>The Routes.rb file is </p>
  
  <pre><code>SampleApp::Application.routes.draw do
  
  #Sign in Routes
    resources :sessions, :only =&gt; [:new, :create, :destroy]
    match '/signin', :to =&gt; 'sessions#new'
    match '/signout', :to =&gt; 'sessions#destroy'
  
  #Microposts Routes
    resources :microposts, :only =&gt; [:create, :destroy]
  
  
  #Pages Routes
    root :to =&gt; "pages#home"
  
    match '/contact', :to =&gt; 'pages#contact'
    match '/about',   :to =&gt; 'pages#about'
    match '/help',    :to =&gt; 'pages#help'
    match '/signup',  :to =&gt; 'users#new'
    match '/development', :to =&gt; 'pages#development'
  
  #Users Routes
    match '/signup',  :to =&gt; 'users#new'
    resources :users
  
  end
  </code></pre>
  
  <p>But, as I said, even replacing my routes file with the one on gitHub did not resolve the issue.</p>
  
  <p>The link to delete is </p>
  
  <pre><code> = link_to "delete", micropost, :method =&gt; :delete,
                                        :confirm =&gt; "You sure?",
                                        :title =&gt; micropost.content
  </code></pre>