diff options
-rw-r--r-- | railties/lib/initializer.rb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/railties/lib/initializer.rb b/railties/lib/initializer.rb index 0aec97dece..6500b2d309 100644 --- a/railties/lib/initializer.rb +++ b/railties/lib/initializer.rb @@ -49,8 +49,10 @@ module Rails end def env - require 'active_support/string_inquirer' - ActiveSupport::StringInquirer.new(RAILS_ENV) + @_env ||= begin + require 'active_support/string_inquirer' + ActiveSupport::StringInquirer.new(RAILS_ENV) + end end def cache |