error 404 do response.status = 404 render 'errors/404', :layout=>:applayout end
It will only show 30 characters of the defined view. Luckily, in this day in age, Google has all the answers and I found out here that in my Gemfile I need to define a certain version of Sinatra for this to work. So I popped open my Gemfile and added the following:
gem 'rake' gem 'sinatra', '1.3.2' gem 'sinatra-flash', :require => 'sinatra/flash'
Once I locked in 1.3.2 instead of the 1.3.3 version of sinatra I was using, it worked like a charm and I stopped looking like a complete idiot that doesn’t now how to serve up error pages properly.