title: undefined method `each' for nil:NilClass... why?
body: <p>rails guide example, click the button save post, console show this message:</p>
  
  <blockquote>
    <p>Started POST "/posts" for 127001  at 2013-12-25 22:42:04 +0800
    Processing by PostsController#create as HTML   Parameters:
    {"utf8"=>"✓", "authenticity_token"=>"CLalUww3gqnSlED0AWdou6P/U2qya
    vPqDiBANQOuYgA=", "post"=>{"title"=>"11", "text"=>"22"},
    "commit"=>"Save Post"}    (0.0ms)  begin transaction    (0.0ms) 
    rollback transaction Redirected to http://    127001:3000/posts
    Completed 302 Found in 16ms (ActiveRecord: 0.0ms)</p>
    
    <p>Started GET "/posts" for 127001 at 2013-12-25 22:42:04 +0800
    Processing by PostsController#index as HTML   Rendered
    posts/index.html.erb within layouts/application (15.6ms) Completed 500
    Internal Server Error in 31ms</p>
    
    <p>ActionView::Template::Error (undefined method `each' for
    nil:NilClass):</p>
  
  <pre><code>        &lt;th&gt;Text&lt;/th&gt;
          &lt;/tr&gt;
          &lt;% @posts.each do |post| %&gt;
  </code></pre>
    
    <p>======================================================</p>
  </blockquote>
  
  <p>routes is correct,  why post is nil?  rails 4.0.2   ruby 2.0</p>