diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2014-08-01 16:56:38 -0700 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2014-08-01 16:56:38 -0700 |
commit | 38ee4fd8d3c46616bc8a09f7486de4a5069df91a (patch) | |
tree | 71cf4d21f27b45b03eb9d2fb9f240a3f33e0107c | |
parent | fcc2cd5a8faff4d56f57111687d0267545a01f05 (diff) | |
download | rails-38ee4fd8d3c46616bc8a09f7486de4a5069df91a.tar.gz rails-38ee4fd8d3c46616bc8a09f7486de4a5069df91a.tar.bz2 rails-38ee4fd8d3c46616bc8a09f7486de4a5069df91a.zip |
Fix the test requirement of resque_scheduler
-rw-r--r-- | lib/active_job/queue_adapters/resque_adapter.rb | 10 |
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 |