ruby-on-rails Rails开发服务器未记录回溯500错误

7kjnsjlb  于 5个月前  发布在  Ruby
关注(0)|答案(2)|浏览(61)

我最近更新了我的应用程序到Rails 7.1,开发服务器似乎已经停止记录错误回溯。
从一个破碎的页面日志的例子:

Started GET "/coffees-subscription-choices" for ::1 at 2023-12-06 16:07:08 -0600
  ActiveRecord::SchemaMigration Load (0.8ms)  SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
Processing by GreatCoffeesController#index as HTML
  Rendering layout layouts/about.html.erb
  Rendering great_coffees/index.html.erb within layouts/about
  Rendered great_coffees/index.html.erb within layouts/about (Duration: 31.9ms | Allocations: 7867)
  Rendered layout layouts/about.html.erb (Duration: 32.1ms | Allocations: 8006)
Completed 500 Internal Server Error in 38ms (ActiveRecord: 12.5ms | Allocations: 11601)

字符串
没有错误信息或回溯。
我搜索了一下,并将这些更改应用到config/initializers/new_framework_defaults_7_1.rb,但没有效果:/

Rails.application.config.action_dispatch.show_exceptions = :all
Rails.application.config.action_dispatch.debug_exception_log_level = :error


有人知道我可能错过了什么吗?Rails7.0按预期记录了错误的回溯。

ecbunoof

ecbunoof1#

我们遇到了同样的问题,我们使用了一个旧版本的gem(sentry-raven 3.1.2)来修补Rails中间件。因为它的render_exception方法签名在Rails 7.1中发生了变化,补丁本身导致了一个异常。原始异常和附加异常都没有显示在任何地方。
我们的解决方案是修补过时的gem,因为我们无法在那里升级。

u5i3ibmn

u5i3ibmn2#

感谢Pascal的建议,我能够将其确定为rollbarweb-console的过时版本。
更新这两个gem让我的错误报告回到了预期的状态!

Using web-console 4.2.1 (was 3.7.0)
Using rollbar 3.4.2 (was 3.3.1)

字符串

相关问题