-
-
Save ryanburnette/480ea91381720566829822aacc065f15 to your computer and use it in GitHub Desktop.
How to use better_errors in Padrino
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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