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 Foundations Loops Control Flow

Invalid retry

I'm at the section of the video where Jason is doing the retry if statement. For some reason I'm getting an invalid retry and compile error (SyntaxError). Anyone else have this issue or know what I may be doing wrong? Thanks a lot!

2 Answers

I had the same issue; turns out the latest version of Ruby doesn't support retry as shown in the video. So you can skip it for now or check out the Ruby docs for rescue (where retry can be used).

More info: https://teamtreehouse.com/forum/invalid-retry-and-compile-error-syntaxerror

Retry hasn't worked that way for about a year now! A note on the video would have been nice as this is very confusing! I hope someone changes the quiz and the extra credit assignment for loops soon as these include retry too!