diff --git a/lib/honeybadger/shared_tasks.rb b/lib/honeybadger/shared_tasks.rb
index <HASH>..<HASH> 100644
--- a/lib/honeybadger/shared_tasks.rb
+++ b/lib/honeybadger/shared_tasks.rb
@@ -1,7 +1,18 @@
 namespace :honeybadger do
   desc "Notify Honeybadger of a new deploy."
-  task :deploy => :environment do
+  task :deploy do
     require 'honeybadger_tasks'
+
+    if defined?(Rails.root)
+      initializer_file = Rails.root.join('config', 'initializers','honeybadger.rb')
+
+      if initializer_file.exist?
+        load initializer_file
+      else
+        Rake::Task[:environment].invoke
+      end
+    end
+
     HoneybadgerTasks.deploy(:environment    => ENV['TO'],
                             :revision       => ENV['REVISION'],
                             :repository     => ENV['REPO'],
Don't load environment during deploy notification, if possible.

Ported from Airbrake: <URL>