The mailer preview index at rails/mailers is broken. It throws ActionView::Template::Error (arguments passed to url_for can't be handled. Please require routes or provide your own implementation). This seems to be because the definition of url_for comes from ActionView::Helpers::UrlHelper. Removing the audited gem makes the preview index work correctly, because url_for then resolves to ActionDispatch::Routing::UrlFor#url_for.
Rails code can often be referenced on load of an application. Rails is responsible for the load order of these frameworks, so when you load frameworks, such as ActiveRecord::Base , prematurely you are violating an implicit contract your application has with Rails. Moreover, by loading code such as ActiveRecord::Base on boot of your application you are loading entire frameworks which may slow down your boot time and could cause conflicts with load order and boot of your application.
Load and configuration hooks are the API that allow you to hook into this initialization process without violating the load contract with Rails. This will also mitigate boot performance degradation and avoid conflicts.
When you call ActionController::Base in lib/audited.rb outside of an on_load hook it causes Ruby to look for the definition of that constant and will require it. This causes the entire ActionPack framework to be loaded before boot.
Acts as audited should probably wrap the following line in an on_load hook as well: