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

How can I combine the Hello string with the interpolated name in the response? Is this not valid?

I'm missing something incredibly obvious here I know it. Any pointers?

hello.rb
require "sinatra"

get "/greet/:name" do
    puts "Hello #{params[:name]}
end

Here was the question - "In the get route for the "/greet/:name" path, respond with a string reading "Hello" followed by the contents of the name URL parameter."

1 Answer

He Clinton, double check your syntax in the puts statement. You're making a simple mistake that I've made a thousand times! Good luck and happy coding!