Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialShruthi Manas
893 PointsError!
irb(main):010:0> treehouse.has_key('address')
NoMethodError: undefined method has_key' for #<Hash:0x2b776c0>
from (irb):10
from C:/Ruby193/bin/irb:12:in
<main>'
1 Answer
Laura Cressman
12,548 PointsHi Shruthi,
I think you forgot the question mark at the end of the .has_key? method. I know those question marks can seem out of place! Try this treehouse.has_key?("address")
. Let me know if that helps!
Wishing you sunshine,
Laura:)
Shruthi Manas
893 PointsShruthi Manas
893 PointsHi Laura,
OOps my bad :p. It worked.
Thanks, Shruthi