Include Better_Errors to your Padrino project
Better_Errors is a gem help you better debug your code. However In Padrino Framework, it's tricky to add this gem.
First add gem dependencies in your Gemfile
.
group :development do
gem 'better_Errors'
gem 'binding_of_caller'
end
Then add to Padrino as a middleware.
Padrino.after_load do
Padrino::Application.use BetterErrors::Middleware
BetterErrors.application_root = PADRINO_ROOT
BetterErrors.logger = Padrino.logger
end
Written by Qi Liu
Related protips
1 Response
great, thanks for share!
over 1 year ago
·
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Better_errors
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#