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

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
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.
This topic is locked and can not be replied to.