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 ...
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.
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