Sinatra
Install Exceptional in your Sinatra app
-
Install the exceptional gem
$ gem install exceptional -
Install the json gem of your choice (choices are: json, json_pure, yajl-ruby, json-jruby)
$ gem install json -
Add Exceptional to your sinatra app's production environment
require 'exceptional' use Rack::Exceptional, API_KEY if ENV['RACK_ENV'] == 'production'You will find the API_KEY in the apps settings screen within Exceptional.
-
Ensure :raise_errors is set to true
set :raise_errors, true -
Ensure Exceptional for Rack is being loaded
Check log/exceptional.log log file
Example
require 'rubygems' require 'sinatra' set :raise_errors, true require 'exceptional' use Rack::Exceptional, API_KEY get '/' do "Hello World!" end get '/error' do big.problem! end