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 Building Web Apps with Sinatra ERB Templates URL Parameters

Emily Coltman
PLUS
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

hello.rb
require "sinatra"

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

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