title: Error encountered The action 'show' could not be found for PostsController
body: <p>I am new in ruby on rails in windows.. I am following some guide through youtube(<a href="https://www.youtube.com/watch?v=BI_VnnOLSKY" rel="nofollow noreferrer">https://www.youtube.com/watch?v=BI_VnnOLSKY</a>) but I encountered error "The action 'show' could not be found for PostsController" when I am defining the index method</p>
  
  <p>NOTE: The version of my ruby on rails in windows is latest. This is my first method I will do and to display my first view but it gives me an error.</p>
  
  <p>Question: Should I put the show method to my PostsController?</p>
  
  <p><strong>Routes</strong></p>
  
  <pre><code>Rails.application.routes.draw do
    # For details on the DSL available within this file, see http://guides.rubyonrails.org/routing.html
    resource :posts
    root "posts#index"
  end
  </code></pre>
  
  <p><strong>Posts Controller</strong></p>
  
  <pre><code>class PostsController &lt; ApplicationController
      def index
      end
  end
  </code></pre>