About No Method Error

This is my own error resolution record.

The team implementation of flea market app creation is finally at the end. Merge what each member has developed into the master I often get an error when pulling to my local.

Click here for this error NoMethodError.png

Occurs when trying to transition from My Page to Logout Page.

undefined method `each' for nil:NilClass

It is a description. Where is the place? Speaking of It is user # show.

When I check the controller immediately

class UsersController < ApplicationController
  def index
    @parents = Category.where(ancestry: nil)
  end

  def show
    
  end
  
end

The contents of the show are empty ... Add description here

class UsersController < ApplicationController
  def index
    @parents = Category.where(ancestry: nil)
  end

  def show
    @parents = Category.where(ancestry: nil)
  end
  
end

When I did, the display returned properly. スクリーンショット 2020-09-23 12.27.23.png

By repeating errors, guess the cause from the error statement yourself It has become possible to solve it. Did I get a little self-propelled power?

It's still a long way to go, but I'll continue to do my best!

Recommended Posts

About No Method Error
No static method getFont error
About the method
Output about the method # 2
About Ruby error messages
About Java method binding
About method splitting (Java)
About the length method
About the authenticate method.
About the map method
About the ancestors method
[No Method Error] Solution when new action occurs
About the to_s method.
Output about the method Part 1
about the where method (rails)
About Spring Framework context error
[Java Silver] About equals method
Consideration about the times method
About Rails scraping method Mechanize
Method
Spring Boot + PostgreSQL error resolution method
About error handling of comment function
About Invalid Request Error in Payjp
[Android] no such table error solution
About the role of the initialize method
[Rails] About helper method form_with [Basic]
About =
About error when implementing spring validation
timestamp status 999 error none message no message available
No qualifying bean of type error handling
About dynamic programming (top-down method, memoization, one-dimensional)
RSpec error resolution undefined method `feature'for RSpec: Module
About the error message Invalid redeclaration of'***'
Get the error message using the any? method
Error: Error response from daemon: No such container: