Disabling error reporting from Sinatra to a browser
To disable error reporting to a browser add next line to your application:
disable :show_exceptions
To disable error reporting to a browser add next line to your application:
disable :show_exceptions
To add Google Analytics code to Sinatra application there’s a need to install gem rack-google-analytics.
gem install rack-google-analytics
Add this to your app.rb:
require 'rack-google-analytics' use Rack::GoogleAnalytics, :tracker => 'UA-XXXXXXXX-X'
And restart the app.