After introducing Better_errors, the error screen does not change

I tried putting better_error, but the error screen did not change

Ruby gem "Better_errors" that makes the error screen rich and easy to use. Looking at the repository, it says that rails can be used by obediently bundle install. The error screen remains the same ...

solution

I added the following and solved it.

/config/environments/development.rb


BetterErrors::Middleware.allow_ip! "0.0.0.0/0"

▼ Reference: better_error does not work in Docker container https://github.com/BetterErrors/better_errors/issues/270 ▼ The source of git is probably here https://github.com/BetterErrors/better_errors/wiki/Allowing-access-to-the-console

When developing using Docker or Vagrant Because rails decides whether to allow better_errors It seems that settings are required.

The question on git says that even if you enter the IP address of Docker, it will not work! Then, let's set it to 0.0.0.0/0 and allow all IP addresses!

The IP address of localhost is OK too

/config/environments/development.rb


BetterErrors::Middleware.allow_ip! "127.0.0.1/0"

I was able to do this.

By the way, what is 127.0.0.1?

Local loopback address. A special IP address that represents itself. This is the IP address of localhost. ▼ Reference https://www.atmarkit.co.jp/ait/articles/0610/14/news021.html

is.

For your information.

Recommended Posts

After introducing Better_errors, the error screen does not change
[Error] How to resolve the event that the screen does not transition after editing
operator does not exist: handling the error timestamp without time zone ~~ unknown
eclipse tab width change does not work.
Setting method that the size does not change even if CSS is changed
[Grails] Error occurred running What to do when the Grails CLI does not start
The devise error message is not displayed properly.
Does the escape sequence (\) not work? (for Mac)
[Error] ActiveRecord :: NoDatabaseError FATAL: database does not exist
Eclipse does not start after Java 11 is installed
Does not recognize the library when implementing jcaptcha
What to do if the update does not take effect after deploying Rails AWS
Solved the problem that profile and logout were not displayed on the screen after signup.
About the "Oops VFS connection does not exist" error and solution in AWS Cloud9
The story when the container does not start up with docker-compose up and an error occurs