Rails NoMethodError in Lists#index [on hold]

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
-3
down vote

favorite












I am building my rails app and I am encountering the following problem:



undefined method `each' for nil:NilClass


This is my path:



/home/rails/example/app/views/lists/index.html.erb


This is my source code from that file:



 </tr>

<% @list.each do |list| %>
<tr>
<td><%= list.title %></td>
<td><%= list.text %></td>


I think I need to define "List", but I don't know where to go to define it.










share|improve this question













put on hold as off-topic by Jeff Schaller, Thomas, Goro, RalfFriedl, Romeo Ninov yesterday



  • This question does not appear to be about Unix or Linux within the scope defined in the help center.
If this question can be reworded to fit the rules in the help center, please edit the question.
















    up vote
    -3
    down vote

    favorite












    I am building my rails app and I am encountering the following problem:



    undefined method `each' for nil:NilClass


    This is my path:



    /home/rails/example/app/views/lists/index.html.erb


    This is my source code from that file:



     </tr>

    <% @list.each do |list| %>
    <tr>
    <td><%= list.title %></td>
    <td><%= list.text %></td>


    I think I need to define "List", but I don't know where to go to define it.










    share|improve this question













    put on hold as off-topic by Jeff Schaller, Thomas, Goro, RalfFriedl, Romeo Ninov yesterday



    • This question does not appear to be about Unix or Linux within the scope defined in the help center.
    If this question can be reworded to fit the rules in the help center, please edit the question.














      up vote
      -3
      down vote

      favorite









      up vote
      -3
      down vote

      favorite











      I am building my rails app and I am encountering the following problem:



      undefined method `each' for nil:NilClass


      This is my path:



      /home/rails/example/app/views/lists/index.html.erb


      This is my source code from that file:



       </tr>

      <% @list.each do |list| %>
      <tr>
      <td><%= list.title %></td>
      <td><%= list.text %></td>


      I think I need to define "List", but I don't know where to go to define it.










      share|improve this question













      I am building my rails app and I am encountering the following problem:



      undefined method `each' for nil:NilClass


      This is my path:



      /home/rails/example/app/views/lists/index.html.erb


      This is my source code from that file:



       </tr>

      <% @list.each do |list| %>
      <tr>
      <td><%= list.title %></td>
      <td><%= list.text %></td>


      I think I need to define "List", but I don't know where to go to define it.







      ubuntu ruby rails






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked yesterday









      Cody Rutscher

      338




      338




      put on hold as off-topic by Jeff Schaller, Thomas, Goro, RalfFriedl, Romeo Ninov yesterday



      • This question does not appear to be about Unix or Linux within the scope defined in the help center.
      If this question can be reworded to fit the rules in the help center, please edit the question.




      put on hold as off-topic by Jeff Schaller, Thomas, Goro, RalfFriedl, Romeo Ninov yesterday



      • This question does not appear to be about Unix or Linux within the scope defined in the help center.
      If this question can be reworded to fit the rules in the help center, please edit the question.

























          active

          oldest

          votes






















          active

          oldest

          votes













          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes

          Popular posts from this blog

          How to check contact read email or not when send email to Individual?

          Displaying single band from multi-band raster using QGIS

          How many registers does an x86_64 CPU actually have?