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
How to add / remove Ruby on Rails columns
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
How to build a Ruby on Rails development environment with Docker (Rails 6.x)
How to build a Ruby on Rails development environment with Docker (Rails 5.x)
[Introduction] Try to create a Ruby on Rails application
I want to be able to read a file using refile with administrate [rails6]
I want to use a little icon in Rails
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
Rails6 I want to make an array of values with a check box
I want to add a reference type column later
I want to hit the API with Rails on multiple docker-composes set up locally
I tried installing Ruby on Rails related plugin with vim-plug
[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
Add a search function in Rails.
[Ruby on Rails] Introduced paging function
How to use Ruby on Rails
[Ruby on Rails] Add / Remove Columns
[Ruby on Rails] CSV output function
[Ruby on Rails] Comment function implementation
[Ruby on Rails] DM, chat function
[Ruby on Rails] I want to get the URL of the image saved in Active Storage
[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
[Ruby on Rails] Since I finished all Rails Tutorial, I tried to implement an additional "stock function"
I want to make a button with a line break with link_to [Note]
I want to connect SONY headphones WH-1000XM4 with LDAC on ubuntu 20.04! !!
I want to convert an array to Active Record Relation with Rails
I want to use swipeback on a screen that uses XLPagerTabStrip
[Ruby] I want to put an array in a variable. I want to convert to an array
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
[Rails] How to put a crown mark on the ranking function
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 develop a web application!