Last Updated: February 25, 2016
·
769
· lovio

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

1 Response
Add your response

great, thanks for share!

over 1 year ago ·