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

need sinatra help

get "/greet/:name" end

How do you write "Hello" with the contents of the name Url parameters.

I thought it would be "Hello" params[:name]

hello.rb
require "sinatra"

get "/greet/:name" do
  # YOUR CODE HERE

end

1 Answer

Jennifer Nordell
seal-mask
STAFF
.a{fill-rule:evenodd;}techdegree
Jennifer Nordell
Treehouse Teacher

Hi there, Stuart Fleishman ! It looks like you're doing terrific and have understood params, but remember, this is a string concatenation. It looks like you're missing the + sign to concatenate "Hello" with params[:name].

Hope this helps! :sparkles: