Forum: Ruby-Forum.com undefined local variable or method `city' for #<Context:0x10099d8>

6abb0062c0964e1b9e828bf33f5b892c?d=identicon&s=25 Gengyang Cai (caigengyang)
on 2015-12-11 07:10
first_name = gets.chomp
last_name = city

undefined local variable or method `city' for #<Context:0x10099d8>

What does "undefined local variable or method `city' for
#<Context:0x10099d8>" mean? Tried searching in Google, but no results
were returned ...
36eac65e4710e4c0d89a9119344ab1c0?d=identicon&s=25 Angelo Liso (awar)
on 2016-01-20 21:21
It's correct the message that return.
What is city?
Another variable or what?
You must define city first and next you can associate to other variable.
Please log in before posting. Registration is free and takes only a minute.
Existing account

NEW: Do you have a Google/GoogleMail, Yahoo or Facebook account? No registration required!
Log in with Google account | Log in with Yahoo account | Log in with Facebook account
No account? Register here.