aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2014-08-01 13:55:16 -0700
committerDavid Heinemeier Hansson <david@loudthinking.com>2014-08-01 13:55:16 -0700
commitfcc2cd5a8faff4d56f57111687d0267545a01f05 (patch)
treebdf737efb4b1992228005384eb2913e0ba43e3fe
parent7a9493ff55ff49979a1d155f3e4472360c1f6967 (diff)
downloadrails-fcc2cd5a8faff4d56f57111687d0267545a01f05.tar.gz
rails-fcc2cd5a8faff4d56f57111687d0267545a01f05.tar.bz2
rails-fcc2cd5a8faff4d56f57111687d0267545a01f05.zip
Improve the error message when resque-scheduler is not available
-rw-r--r--lib/active_job/queue_adapters/resque_adapter.rb6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/active_job/queue_adapters/resque_adapter.rb b/lib/active_job/queue_adapters/resque_adapter.rb
index cddc4b5424..ab65bfa39c 100644
--- a/lib/active_job/queue_adapters/resque_adapter.rb
+++ b/lib/active_job/queue_adapters/resque_adapter.rb
@@ -1,10 +1,12 @@
require 'resque'
require 'active_support/core_ext/enumerable'
require 'active_support/core_ext/array/access'
+
begin
require 'resque-scheduler'
-rescue LoadError
- 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
end
module ActiveJob