diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2014-08-01 13:55:16 -0700 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2014-08-01 13:55:16 -0700 |
commit | fcc2cd5a8faff4d56f57111687d0267545a01f05 (patch) | |
tree | bdf737efb4b1992228005384eb2913e0ba43e3fe | |
parent | 7a9493ff55ff49979a1d155f3e4472360c1f6967 (diff) | |
download | rails-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.rb | 6 |
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 |