gpt4 book ai didi

ruby-on-rails - 从 gem 生成的静音弃用警告

转载 作者:数据小太阳 更新时间:2023-10-29 07:02:51 24 4
gpt4 key购买 nike

我正在使用 unscoped_associations我的 Rails 5.0.0.1 应用程序中的 gem。

我收到这个弃用警告:

DEPRECATION WARNING: alias_method_chain is deprecated. Please, use Module#prepend instead. From module, you can access the original method using super. (called from <top (required)> at /home/rhl/myapp/config/application.rb:8)
DEPRECATION WARNING: alias_method_chain is deprecated. Please, use Module#prepend instead. From module, you can access the original method using super. (called from <top (required)> at /home/rhl/myapp/config/application.rb:8)
DEPRECATION WARNING: alias_method_chain is deprecated. Please, use Module#prepend instead. From module, you can access the original method using super. (called from <top (required)> at /home/rhl/myapp/config/application.rb:8)

如何在生产环境中消除此警告?

我试过添加:

config.active_support.deprecation = :silence

production.rb

但它不起作用。

最佳答案

ActiveSupport::Deprecation.silenced = true

关于ruby-on-rails - 从 gem 生成的静音弃用警告,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41759014/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com