aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/active_job/queue_adapters/resque_adapter.rb10
1 files changed, 7 insertions, 3 deletions
diff --git a/lib/active_job/queue_adapters/resque_adapter.rb b/lib/active_job/queue_adapters/resque_adapter.rb
index ab65bfa39c..b228825f07 100644
--- a/lib/active_job/queue_adapters/resque_adapter.rb
+++ b/lib/active_job/queue_adapters/resque_adapter.rb
@@ -4,9 +4,13 @@ require 'active_support/core_ext/array/access'
begin
require 'resque-scheduler'
-rescue LoadError => e
- $stderr.puts 'The ActiveJob resque adapter requires resque-scheduler. Please add it to your Gemfile and run bundle install'
- raise e
+rescue LoadError
+ begin
+ require 'resque_scheduler'
+ rescue LoadError
+ $stderr.puts 'The ActiveJob resque adapter requires resque-scheduler. Please add it to your Gemfile and run bundle install'
+ raise e
+ end
end
module ActiveJob