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 trialZachary Dunn
6,557 PointsThis code does not work in Workspace...
I understand how this code should work. But even when copy/pasting into workspace, it does not return anything.
3 Answers
Maciej Czuchnowski
36,441 PointsI copied the code into new Workspace ruby file, executed it in the terminal and it behaves the same way as the videos show. What steps did you take and how did it fail for you?
Hunter Garrett
6,339 PointsDid you file -> save? Sounds silly, but I forgot to do this and it won't run until you save it :P
Jonathan Sanchez
8,080 PointsYep at first the
.inspect
was breaking the workspace. However, after reloading the workspace it worked with the .INSPECT
Zachary Dunn
6,557 PointsZachary Dunn
6,557 Pointssame thing, copied code into new workspace ruby file. it asks for list name, then just returns to normal. doesn't do anything else.
Zachary Dunn
6,557 PointsZachary Dunn
6,557 Pointstreehouse:~/workspace$ ruby shopping_list.rb
What is the list name?Groceries
treehouse:~/workspace$
Maciej Czuchnowski
36,441 PointsMaciej Czuchnowski
36,441 PointsYou are sure you have this last line as well in the file?
puts list.inspect
If so, please contact Support (link on the right) and describe the problem in detail.
Zachary Dunn
6,557 PointsZachary Dunn
6,557 Pointsi had to restart workspace... thank you for your help good SIR