lib/active_support/railtie.rb in activesupport-7.1.0.beta1 vs lib/active_support/railtie.rb in activesupport-7.1.0.rc1
- old
+ new
@@ -86,10 +86,10 @@
# Sets the default value for Time.zone
# If assigned value cannot be matched to a TimeZone, an exception will be raised.
initializer "active_support.initialize_time_zone" do |app|
begin
TZInfo::DataSource.get
- rescue TZInfo::DataSourceNotFound => e
+ rescue TZInfo::DataSourceNotFound, TZInfo::ZoneinfoDirectoryNotFound => e
raise e.exception "tzinfo-data is not present. Please add gem 'tzinfo-data' to your Gemfile and run bundle install"
end
require "active_support/core_ext/time/zones"
Time.zone_default = Time.find_zone!(app.config.time_zone)
end