jeremyevans / home_run

Fast Date/DateTime classes for ruby :: Unmaintained, unnecessary on ruby 1.9.3+
Other
465 stars 10 forks source link

home_run + active_support 3.1 == WTF #41

Closed grosser closed 12 years ago

grosser commented 12 years ago

We ended up with this error (just for other googleers...) /Users/pivotal/.rvm/gems/ruby-1.9.2-p290@allocations-rails3/gems/tzinfo-0.3.31/lib/tzinfo/data_timezone_info.rb:139:in period_for_utc': No transitions found in search (RuntimeError) from /Users/pivotal/.rvm/gems/ruby-1.9.2-p290@allocations-rails3/gems/tzinfo-0.3.31/lib/tzinfo/data_timezone.rb:34:inperiod_for_utc' from /Users/pivotal/.rvm/gems/ruby-1.9.2-p290@allocations-rails3/gems/tzinfo-0.3.31/lib/tzinfo/timezone_proxy.rb:52:in `period_for_utc'

and the reason was that home_run and active_support seem to collide when comparing DateTime

require 'home_run'
DateTime.now < DateTime.new(2013)
 => true 
require 'active_support/all'
 => true 
DateTime.now < DateTime.new(2013)
 => false 

requiring the other way around works

jeremyevans commented 12 years ago

This is most likely caused by the same ActiveSupport bug that caused #38, see the workaround in that ticket and the ActiveSupport pull request: https://github.com/rails/rails/pull/2797