Rails verbose deprecation logging

We recently went though a upgrade from rails 3 to 4 at my company. During that process we encountered a lot of deprecation notices. Most are pretty standard and easy to find where to make the fix. Some are not, especially if they are coming from an external Gem. I found this post which describes how to print the full stack trace in the log instead of just the warning message Deprecation warnings full stack trace. To get this more verbose logging just add the following line to your config/application.rb file. This should go under the require ‘rails/all’ line.


ActiveSupport::Deprecation.debug = true

Leave a Reply

Your email address will not be published. Required fields are marked *