The hardest part of creating a portfolio was debugging!
So, this time, I introduced better_errors
and binding_of_caller
, which seem to display a convenient and highly functional error screen.
better_errors
?A gem that formats the default error screen in an easy-to-understand manner.
binding_of_caller
?A gem that allows you to use irb on your browser when used with the better_errors
above.
Gemfile
group :development do
gem 'better_errors'
gem 'binding_of_caller'
end
Terminal
bundle
app/config/environments/development.rb
BetterErrors::Middleware.allow_ip! "0.0.0.0/0"
As shown below, an error message or debug screen is displayed, You can debug with irb from the browser without displaying the terminal. In addition, you can check trace information, request information, local variables, etc.
This is insanely convenient! Debugging progresses! When I make an app with rails, I will definitely introduce it!
-Welcome programming beginners! Basics and secrets for graduating from "I got an error. What should I do?" (With explanation video) -Debug with Rails Better Errors (also errors in Ajax) -Ruby / Ruby on Rails debugging method summary -[Rails] Debugging gem'better_errors','binding_of_caller' that I wanted to know earlier -Error screen that makes Rails debugging progress Better Errors I tried using it!