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 Root Path

Can't seem to find the error here

Can't get passed this error

hello.rb
require "sinatra"

set :bind, "0.0.0.0"

get "/" do
  "<h1> "Welcome!" </h1>"
end

Try removing the quotes from the outside of your <h1> tags. I haven’t done Sinatra in a long time so I’m not real familiar with the syntax.

1 Answer

Jay McGavren
STAFF
Jay McGavren
Treehouse Teacher

Ruby interprets "<h1> "Welcome!" </h1>" as two strings, "<h1> " and " </h1>", surrounding a reference to a nonexistent constant named Welcome and a ! operator.

Did you mean "<h1> \"Welcome!\" </h1>"?