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!
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
Muhammad Saif11,565 Points
Keep getting the error address_book.rb:98: syntax error, unexpected end-of-input, expecting keyword_end
Hi I keep getting error for this code :
def run loop do puts "Address Book" puts "a: Add Contact" puts "p: Print Address Book" puts "e: Exit" print 'Enter your choice: ' input = gets.chomp case input when 'e' break end end end address_book = AddressBook.new address_book.run
Above is the written code. When I run this I get
address_book.rb:98: syntax error, unexpected end-of-input, expecting keyword_end
The 98th line is
What is wrong with my code?
Marco Fregoso379 Points
I don't even now ruby but could it be that you forgot and missed one of those "end" keywords near the bottom of your code