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

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Ac40fb30e9f4ce732545432e2c654c09?d=identicon&s=25 Gengyang C. (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 ...
D9349592c7cad9c874e547ee0a42b471?d=identicon&s=25 Angelo L. (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.
This topic is locked and can not be replied to.