irb (main): 010: 0>profile.user_id = user.id
Traceback (most recent call last):
1: from (irb): 10
NameError (undefined local variable or method `user 'for main: Object)
Did you mean? Super
irb (main): 011: 0>
I want to create a console, but I get an error.
Confirmed by User.count, one is included.
Learning while watching the video, the video seems to work normally.
I have researched various things, but I can't find a clue for the solution.
Answer # 1
profile.user_id = user.id ｀user = User. For example,user = User.first`
- ruby on rails 5 - undefined local variable or method error cannot be resolved
- ruby on rails - i want to resolve nameerror in micropostscontroller # search
- ruby on rails - undefined method `merge'for
- ruby - rails: fattachment_field gives undefined method error
- ruby on rails 6 - undefined method `id'for: article: symbol resolution in rails
- ruby on rails - i want to resolve rails nameerror
- ruby on rails - undefined method `if'for ~
- ruby on rails - can't connect to local mysql server through socket'/tmp/mysqlsock' (2 "no such file or director error"
- ruby on rails - nameerror in contacts # index
- ruby on rails 5 - undefined method `tomorrow'for 00: i would like to know how to solve bigdecimal
- [ruby on rails] i can no longer start the app in the local environment
- ruby on rails - nameerror in looks # index
- ruby on rails 6 - use the local wsdl file in the soap client
- ruby on rails: undefined method ʻuser'for nil: about nomethoderror of nilclass
- slim - nameerror in ruby on rails
- ruby on rails - when i make a message, i want the date to be displayed, but i get "undefined method` strftime' for nil: nil
- ruby - [rails] about nameerror
- [ruby on rails] how to write when getting a model nested in multiple stages with includes
- ruby on rails - after installing devise on rails6, routing error occurs, so i want to eliminate it
- ruby on rails uninitialized constant error