diff --git a/lib/hoptoad_notifier/railtie.rb b/lib/hoptoad_notifier/railtie.rb
index <HASH>..<HASH> 100644
--- a/lib/hoptoad_notifier/railtie.rb
+++ b/lib/hoptoad_notifier/railtie.rb
@@ -9,7 +9,7 @@ module HoptoadNotifier
       require "hoptoad_notifier/rails3_tasks"
     end
 
-    config.middleware.insert_after ActionDispatch::ShowExceptions, HoptoadNotifier::Rack
+    config.app_middleware.insert_after ActionDispatch::ShowExceptions, HoptoadNotifier::Rack
 
     config.after_initialize do
       HoptoadNotifier.configure(true) do |config|
updated railtie to work with the new rails 3 middleware api