Skip to content

Instantly share code, notes, and snippets.

@ryanburnette
Forked from tyabe/better_errors_plugin.rb
Last active June 2, 2020 12:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ryanburnette/480ea91381720566829822aacc065f15 to your computer and use it in GitHub Desktop.
Save ryanburnette/480ea91381720566829822aacc065f15 to your computer and use it in GitHub Desktop.
How to use better_errors in Padrino
# Gemfile
group :development do
gem "better_errors"
gem "binding_of_caller"
end
# config/boot.rb, after Bundler.require(:default, RACK_ENV)
if Padrino.env == :development
require 'better_errors'
Padrino::Application.use BetterErrors::Middleware
BetterErrors.application_root = PADRINO_ROOT
BetterErrors.logger = Padrino.logger
end
# config/apps.rb
set :protect_from_csrf, !(Padrino.env == :development)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment