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.
If you encounter en error:
make: g++: Command not found make: *** [kb.o] Error 127
while trying to update your Ruby gems on Centos, it means that you don’t have C++ compiler installed. Here’s how to fix it:
yum install gcc-c++