iconv deprecation warning with ruby 1.9.3

后端 未结 5 2220
小鲜肉
小鲜肉 2020-12-13 13:02

I\'m getting this warning when I run rspec:

/gems/activesupport-3.1.0/lib/active_support/dependencies.rb:240:in `block in require\': iconv will be deprecated in          


        
5条回答
  •  星月不相逢
    2020-12-13 13:47

    You can pin down the exact location of the warning by generating exceptions for ActiveSupport::Deprecation, instead of just printing to the log. At the top of application.rb:

    ActiveSupport::Deprecation.behavior = Proc.new do |message, backtrace|
      raise message
    end
    

    Once you've figured out where the warning is coming from (by inspecting the full backtrace), remove this again.

提交回复
热议问题