当请求发送到端点时,Rails 应用程序会给出 400 错误,给出“重新加载不会重新启动应用程序”。

发布于 2025-01-17 09:27:53 字数 523 浏览 2 评论 0原文

应用程序正在使用datadog,最初它给出了404未找到,尽管在日志中我可以看到它给出了Datadog跟踪器配置,未能建立到127.0.0.1:8126,Datadog::Transport::InternalRrrorResponse的TCP连接。请不要将应用程序连接到测试数据库,并且我正在使用 docker。

由于我在本地不需要 datadog,因此我将其注释掉并重建它并再次启动容器,但它没有给出 datadog 错误,但下面提到的

重新加载错误不会重新启动应用程序,因此在初始化期间执行的代码不会再次运行。例如,如果您重新加载记录器,则预期的更改将不会反映在过时的类对象 config.autoloader 设置为 classic 中。如果 config.autoloader 设置为 :zeitwerk,这些自动加载常量将被卸载。请检查“自动加载和重新加载常量”指南以获取解决方案。

任何帮助将不胜感激,我正在使用邮递员在适用于移动应用程序的端点上发送简单的 GET 请求。

Application is using datadog, initially it was giving 404 not found although in logs I could see that it was giving Datadog tracer configuration, failed to establish TCP connection to 127.0.0.1:8126 ,Datadog::Transport::InternalRrrorResponse. Please not the application is connected to test database and I am using docker.

Since I did not need datadog locally, I commented that out and rebuild it and started container again but then it was not giving datadog error but the error mentioned below

reloading does not reboot the application, and therefore code executed during initialization does not run again. sp if you reload logger for example the expected changes wont be reflected int hat stale class object config.autoloader is set to classic. These autoload constant would have been unloaded if config.autoloader had been set to :zeitwerkPlease, check the "Autoloading and Reloading Constants" guide for solutions.

Any help would be highly appreciated, I am using postman to send a simple GET request on an end point that is intended for mobile apps.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文