Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

Ruby Building Web Apps with Sinatra ERB Templates URL Parameters

Emily Coltman
Emily Coltman
Courses Plus Student 9,623 Points

Hello, I'm afraid I don't understand what I've done wrong for this challenge :) Could I have some guidance, please?

Also, for general feedback to Treehouse, it would be really good to have helpful hints on all the challenges - saying "Try again" doesn't tell me what I've done wrong :) Thanks! Emily

require "sinatra"

get "/greet/:name" do
  return "Hello" params[:name]

2 Answers

haha, yes I certainly agree about the try again message. You should put: return "Hello #{params[:name]}". Please mark as a best answer if this was helpful.

Emily Coltman
Emily Coltman
Courses Plus Student 9,623 Points

Thanks very much - I've managed to get past this now :) I tried putting "puts" instead of "return" and that didn't work, but when I removed "puts" it did! I can't remember if I ultimately had to use string interpolation to finish successfully.

can you please mark my answer as best answer so others know the question has been resolved