1
0
Fork 0
mirror of https://github.com/mperham/sidekiq.git synced 2022-11-09 13:52:34 -05:00

Ensure Rails module has #env (#3403)

This commit is contained in:
eigilsagafos 2017-03-22 16:11:09 +01:00 committed by Mike Perham
parent ce9b503ab1
commit 28618ec44a

View file

@ -317,7 +317,7 @@ module Sidekiq
end
end
if defined?(::Rails) && !Rails.env.test?
if defined?(::Rails) && Rails.respond_to?(:env) && !Rails.env.test?
puts("**************************************************")
puts("⛔️ WARNING: Sidekiq testing API enabled, but this is not the test environment. Your jobs will not go to Redis.")
puts("**************************************************")