I want to add a browsing function with ruby on rails

It's been about two weeks since I started programming.

NoMethodError in Todolists#index Showing /home/vagrant/work/sample_app/app/views/todolists/index.html.erb where line #2 raised:

undefined method `each' for nil:NilClass Extracted source (around line #2): 1NoMethodError in Todolists#index Showing /home/vagrant/work/sample_app/app/views/todolists/index.html.erb where line #2 raised:

undefined method `each' for nil:NilClass Extracted source (around line #2 1

Post list </ h1> 2 <% @lists.each do |list| %>← This is an error 3

Title </ p> 4 <%= list.title %> 5 <% end %>

I get an error like this and I don't know how to solve it.

I copied the text because I don't understand it too much, but it has not been passed.

Where should I review it?

Recommended Posts

I want to add a browsing function with ruby on rails
I made a portfolio with Ruby On Rails
I want to define a function in Rails Console
I want to add a delete function to the comment function
[Ruby on Rails] Add a column with a foreign key constraint
I want to make a function with kotlin and java!
Steps to build a Ruby on Rails development environment with Vagrant
[Rails] I want to add data to Params when transitioning with link_to
(Ruby on Rails6) Create a function to edit the posted content
I tried to make a group function (bulletin board) with Rails
Add a tag function to Rails. Use acts-as-taggable-on
[Ruby] I want to do a method jump!
I want to play with Firestore from Rails
[Rails] I want to load CSS with webpacker
I want to be able to read a file using refile with administrate [rails6]
I want to monitor a specific file with WatchService
I want to download a file on the Internet using Ruby and save it locally (with caution)
I want to authenticate users to Rails with Devise + OmniAuth
I want to hit the API with Rails on multiple docker-composes set up locally
[Rails] I tried to create a mini app with FullCalendar
I want to push an app made with Rails 6 to GitHub
I want to implement a product information editing function ~ part1 ~
I want to make a list with kotlin and java!
A note about the seed function of Ruby on Rails
I want to create a form to select the [Rails] category
[Ruby on Rails] Implement login function by add_token_to_users with API
How to display a graph in Ruby on Rails (LazyHighChart)
Even in Java, I want to output true with a == 1 && a == 2 && a == 3
I want to create a Parquet file even in Ruby
Apply CSS to a specific View in Ruby on Rails
How to use Ruby on Rails
[Ruby on Rails] CSV output function
[Ruby on Rails] Comment function implementation
[Ruby on Rails] DM, chat function
[Ruby on Rails] I get a warning when executing RSpec due to a different gem version.
Implemented a strong API for "I want to display ~~ on the screen" with simple CQRS
I want to use swipeback on a screen that uses XLPagerTabStrip
I tried to implement the image preview function with Rails / jQuery
I get a Ruby version error when I try to start Rails.
I want to add the disabled option to f.radio_button depending on the condition
I want to add devise in Rails, but I can't bundle install
I want to extract between character strings with a regular expression
I want to use DBViewer with Eclipse 2018-12! !!
I want to write a unit test!
[Rails withdrawal] Create a simple withdrawal function with rails
[Ruby on Rails] Follow function implementation: Bidirectional
[Ruby on Rails] Controller test with RSpec
Deploy to Heroku [Ruby on Rails] Beginner
I made a risky die with Ruby
Make a login function with Rails anyway

Preparing to introduce jQuery to Ruby on Rails
[Ruby on Rails] How to use redirect_to
[Ruby on Rails] Model test with RSpec
[Ruby on rails] Implementation of like function
[Ruby on Rails] Button to return to top
[Ruby on Rails] Logical deletion (withdrawal function)
How to create a query using variables in GraphQL [Using Ruby on Rails]
I want to select multiple items with a custom layout in Dialog
Even in Java, I want to output true with a == 1 && a == 2 && a == 3 (PowerMockito edition)
Minimal steps to set up a Ruby environment with rbenv on Ubuntu 20.04
[Ruby on Rails] Create a pie chart for each column with Chartkick