Ruby Practice Sinatra Basics Practice ERB Templates ERB Templates

Can anybody help please?

Got stuck on this Sinatra challenge...

app.rb
require "sinatra"

get "/:word" do
  @word = params[:word]
  erb :word
end
views/word.erb
<h1><%= @word %></h1>
<p>Backwards: <%=  @word.reverse %></p>
<p>Uppercase: <%= @word.uppercase %></p>
<p>Length: <%= @word.length %></p>

1 Answer

Jay McGavren
STAFF
Jay McGavren
Treehouse Teacher

You just need to call @word.upcase instead of @word.uppercase. After that it should pass.

The preview is admittedly not much help in figuring this out. I think it may have a bug. We're looking into that now.