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 trialJason Henson
8,300 PointsWorking on Ruby Methods section. When I launch the workspace, the code that is in there has an error?
?
2 Answers
Hunter Cassidy
5,674 PointsDo you have a space between add
and (2,3)
?
If so remove it.
Jason Henson
8,300 PointsIt's the pre-set code from Treehouse that's already in the workspace when I open it up. There is a space there and I tried removing it, but get the same error...
methods.rb:5: syntax error, unexpected ',', expecting ')' add (2, 3)
Hunter Cassidy
5,674 Pointswhich video in the methods section? also stupid question: you did make sure you saved it right?
Jason Henson
8,300 PointsIt's the 3rd video "Method Returns" and yes I did save it. I've tried running it with the code it opens up with and modifying the code and I can't get it to work correctly. But the code looks correct....
Jason Henson
8,300 PointsHey, thanks for working to help me figure this out. I didn't see there was another space in there they I didn't remove. Once I removed it, it was working correctly. Thanks again!
Hunter Cassidy
5,674 PointsNot a problem. Remember to mark as answered :)
Fabian Pijpers
Courses Plus Student 41,372 PointsAlways put a komma separator between the values en a space in between, this also leads to greater readability
Jason Henson
8,300 PointsJason Henson
8,300 Pointsdef add (a, b) puts a + b end
add (2, 3)
ruby methods.rb - returns error