Rails.env vs RAILS_ENV
According to the docs, #Rails.env wraps RAILS_ENV: # File vendor/rails/railties/lib/initializer.rb, line 55 def env @_env ||= ActiveSupport::StringInquirer.new(RAILS_ENV) end But, look at specifically how it’s wrapped, using ActiveSupport::StringInquirer: Wrapping a string in this class gives you a prettier way to test for equality. The value returned by Rails.env is wrapped in a StringInquirer object so instead … Read more