Dotenv.load if ENV['RACK_ENV'] == "development"

require 'rollbar'

Dir["./helpers/*.rb"].each { |file| require file }
Dir["./models/*.rb"].each { |file| require file }
Dir["./routes/*.rb"].each { |file| require file }


class App < Sinatra::Application
  configure do
    set :root, File.dirname(__FILE__)

    # Mongoid
    Mongoid.load!("./config/mongoid.yml")

    # Rollbar
    Rollbar.configure do |config|
      config.access_token = ENV["ROLLBAR_ACCESS_TOKEN"]
    end
  end
end

Dotenv.load if ENV['RACK_ENV'] == "development"

require 'rollbar'

Dir["./helpers/*.rb"].each { |file| require file }
Dir["./models/*.rb"].each { |file| require file }
Dir["./routes/*.rb"].each { |file| require file }


class App < Sinatra::Application
  configure do
    set :root, File.dirname(__FILE__)
    set :show_exceptions, :after_handler

    # Mongoid
    Mongoid.load!("./config/mongoid.yml")

    # Rollbar
    Rollbar.configure do |config|
      config.access_token = ENV["ROLLBAR_ACCESS_TOKEN"]
    end
  end


end

Add show_exceptions in configure block
Add show_exceptions in configure block
