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 trial

Ruby Ruby Collections Ruby Hashes Ruby Hash Creation

What is challenge 3 of 3? Ruby Collection

Challenge task 2 of 3 and 3 of 3 is the same and is not letting me pass. Any reason why this is happening?

3 Answers

It seems like question is not structured correctly because its looking for a key called "quantity" in the hash. So doing this should let you pass:

grocery_item_1 = {"name" => "milk", "quantity" => 1}

Yea i did that and no luck. I'm thinking its a bug or something

Actually got it to work...thanks for the help!

No problem

Ethan Lowry
PLUS
Ethan Lowry
Courses Plus Student 7,323 Points

Looks like somebody messed up and used the same question text for both challenges.

But if you look at the error on challenge 3 when you do the wrong thing, it gives away what you're meant to do: They want you to add a 'quantity' key to the hash, with a value of 1.

Yea that exactly what I did