【发布时间】:2017-01-20 08:20:41
【问题描述】:
我在我的 Rails 5.0.0.1 应用程序中使用 unscoped_associations 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
但它不起作用。
【问题讨论】:
-
这个有效:stackoverflow.com/questions/5591509/… (export RUBYOPT=-W0)
标签: ruby-on-rails ruby ruby-on-rails-5