diff --git a/lib/loggerator/railtie/adapter.rb b/lib/loggerator/railtie/adapter.rb
index <HASH>..<HASH> 100644
--- a/lib/loggerator/railtie/adapter.rb
+++ b/lib/loggerator/railtie/adapter.rb
@@ -9,12 +9,15 @@ module Loggerator
       end
 
       config.before_initialize do
-        [ ActionView::Base,
-          ActiveRecord::Base,
-          ActionMailer::Base,
-          ActionController::Base ].each do |c|
-
-          c.include Loggerator
+        %w[ ActionView::Base
+            ActiveRecord::Base
+            ActionMailer::Base
+            ActionController::Base ].each do |c|
+          begin
+            base_class = Module.const_get(c)
+            base_class.include Loggerator
+          rescue NameError
+          end
         end
       end
skip including Loggerator on base classes that aren't loaded

some rails installs skip certain components, eg. actionmailer,
actionview, etc. So, we only include Loggerator on the base classes of
components that are loaded.