diff --git a/lib/sidekiq/cli.rb b/lib/sidekiq/cli.rb index c8c050c2..84cb2a3d 100644 --- a/lib/sidekiq/cli.rb +++ b/lib/sidekiq/cli.rb @@ -182,7 +182,11 @@ module Sidekiq end def set_environment(cli_env) - @environment = cli_env || ENV["RAILS_ENV"] || ENV["RACK_ENV"] || "development" + # See #984 for discussion. + # APP_ENV is now the preferred ENV term since it is not tech-specific. + # Both Sinatra 2.0+ and Sidekiq support this term. + # RACK_ENV and RAILS_ENV are there for legacy support. + @environment = cli_env || ENV["APP_ENV"] || ENV["RACK_ENV"] || ENV["RAILS_ENV"] || "development" end def symbolize_keys_deep!(hash)