I'm trying to create a follower function, but when I press the follow button, I get the following error.
In addition, I have not set to restrict the follow of my own posts.
I would appreciate it if you could point out something.
Answer # 1
It was a method error caused by accessing a function that requires login while current_user is nil, that is, not logged in. I had to be redirected to the login screen when I pressed the follow button when I wasn't logged in.
- ruby on rails 6 - [error] nomethoderror in followscontroller # destroy undefined method `destroy'for nil: nilclass
- ruby on rails - nomethoderror in itemscontroller # new error
- ruby on rails 6 - [error] nomethoderror in communitiescontroller # create undefined method `published?'for # <community: 0x0
- ruby on rails 6 - [error] nomethoderror in communities # index undefined method `following?'for nil: nilclass
- ruby on rails - i don't understand the content of the error
- ruby on rails 6 - [error] uninitialized constant user (call'userconnection' to establish a connection) :: image
- ruby on rails - rails routing error
- ruby on rails - i get an error without being created
- ruby on rails 6 - when i press new user registration, i get an error of no route matches [get] "/ users"
- ruby on rails - error when implementing rails6 follow function
- ruby on rails - syntax error cannot be resolved
- ruby - [rails] about the error that occurs when deleting likes (routing error)
- ruby on rails 5 - i want to get an error message when i enter the user id in full-width in url
- ruby on rails - i want to resolve rails name error
- ruby - an error occurs when building a rails 6 environment with docker
- ruby on rails 6 - i want to solve the error that occurred while implementing the product listing function
- error in building environment of ruby on rails
- ruby on rails - i get a template is missing error in render
- ruby on rails - rspec validation error
- python - you may need to restart the kernel to use updated packages error
- php - coincheck api authentication doesn't work
- php - i would like to introduce the coincheck api so that i can make payments with bitcoin on my ec site
- dart - flutter: the instance member'stars' can't be accessed in an initializer error
- [php] i want to get account information using coincheck api
- the emulator process for avd pixel_2_api_29 was killed occurred when the android studio emulator was started, so i would like to
- sh - 'apt-get' is not recognized as an internal or external command, operable program or batch file
- i want to call a child component method from a parent in vuejs
- i want to check the type of a shell script variable