How to make backtrace silencers work?

Fresh Rails 4.2 set up. I want to suppress long error backtraces. In the following backtrace log first line would be enough for me, and next 4 could be removed

ActionController::RoutingError (No route matches [GET] "/user"):
  actionpack (4.2.1) lib/action_dispatch/middleware/debug_exceptions.rb:21:in `call'
  web-console (2.1.2) lib/web_console/middleware.rb:37:in `call'
  actionpack (4.2.1) lib/action_dispatch/middleware/show_exceptions.rb:30:in `call'
  railties (4.2.1) lib/rails/rack/logger.rb:38:in `call_app'

I’ve added a new silencer to backtrace_silencers.rb

# config/initializers/backtrace_silencers.rb
Rails.backtrace_cleaner.add_silencer { |line| line =~ /lib/ }

After server restart - nothing happens, i’m still getting same backtrace log. (Each line matching /lib/ was supposed to be removed: http://api.rubyonrails.org/classes/ActiveSupport/BacktraceCleaner.htm)

Sanity check:

> line = "actionpack (4.2.1) lib/action_dispatch/middleware/debug_exceptions.rb:21:in `call'"
=> "actionpack (4.2.1) lib/action_dispatch/middleware/debug_exceptions.rb:21:in `call'"
> line =~ /lib/
=> 19

But filters work:

# config/initializers/backtrace_silencers.rb
Rails.backtrace_cleaner.add_filter { |line| line.gsub('lib', 'yeah!') }

Now backtrace looks like this:

ActionController::RoutingError (No route matches [GET] "/user"):
  actionpack (4.2.1) yeah!/action_dispatch/middleware/debug_exceptions.rb:21:in `call'
  web-console (2.1.2) yeah!/web_console/middleware.rb:37:in `call'
  actionpack (4.2.1) yeah!/action_dispatch/middleware/show_exceptions.rb:30:in `call'
  railties (4.2.1) yeah!/rails/rack/logger.rb:38:in `call_app'

Would appreciate an advice how to make silencers work. Cheers!

PS. Also published here: stackoverflow

Once of the issues was with Minitest-Reporters gem (adds colors to Minitest output), it messes up with Rails backtrace filters, more details here: GitHub - minitest-reporters/minitest-reporters: Create customizable MiniTest output formats.

Main problem still unsolved

Not sure if this will be helpful, but the way I did this during RSpec runs in particular was like this:

config.filter_gems_from_backtrace "rack", "rake", "actionview", "actionpack", "activesupport", "activerecord"

Thanks, looking for a way to get rid of noisy error backtraces in development log