josedonizetti/ruby-duration

ruby-duration raise error when used with activesupport >= 4.2

Closed this issue · 4 comments

tune commented

I've encountered error when used with latest activesupport (>= 4.2).

% ruby -v
ruby 2.1.5p273 (2014-11-13 revision 48405) [i386-mingw32]

% bundle exec ruby sample.rb
DL is deprecated, please use Fiddle
C:/Ruby21/lib/ruby/gems/2.1.0/gems/activesupport-4.2.0/lib/active_support/core_ext/module/deprecation.rb:21:in `deprecate': uninitialized constant ActiveSupport::Deprecation (NameError)
        from C:/Ruby21/lib/ruby/gems/2.1.0/gems/activesupport-4.2.0/lib/active_support/core_ext/class/delegating_attributes.rb:26:in `<class:Class>'
        from C:/Ruby21/lib/ruby/gems/2.1.0/gems/activesupport-4.2.0/lib/active_support/core_ext/class/delegating_attributes.rb:6:in `<top (required)>'
        from C:/Ruby21/lib/ruby/gems/2.1.0/gems/activesupport-4.2.0/lib/active_support/core_ext/class.rb:2:in `require'
        from C:/Ruby21/lib/ruby/gems/2.1.0/gems/activesupport-4.2.0/lib/active_support/core_ext/class.rb:2:in `<top (required)>'
        from C:/Ruby21/lib/ruby/gems/2.1.0/gems/activesupport-4.2.0/lib/active_support/core_ext.rb:2:in `require'
        from C:/Ruby21/lib/ruby/gems/2.1.0/gems/activesupport-4.2.0/lib/active_support/core_ext.rb:2:in `block in <top (required)>'
        from C:/Ruby21/lib/ruby/gems/2.1.0/gems/activesupport-4.2.0/lib/active_support/core_ext.rb:1:in `each'
        from C:/Ruby21/lib/ruby/gems/2.1.0/gems/activesupport-4.2.0/lib/active_support/core_ext.rb:1:in `<top (required)>'
        from C:/Ruby21/lib/ruby/gems/2.1.0/gems/ruby-duration-3.2.0/lib/duration.rb:3:in `require'
        from C:/Ruby21/lib/ruby/gems/2.1.0/gems/ruby-duration-3.2.0/lib/duration.rb:3:in `<top (required)>'
        from C:/Ruby21/lib/ruby/gems/2.1.0/gems/ruby-duration-3.2.0/lib/ruby-duration.rb:2:in `require'
        from C:/Ruby21/lib/ruby/gems/2.1.0/gems/ruby-duration-3.2.0/lib/ruby-duration.rb:2:in `<top (required)>'
        from sample.rb:1:in `require'
        from sample.rb:1:in `<main>'

As for minimum code for reproduce, please refer my gist.

Can confirm this, happens to me as well.

Just added a PR that fixes the issue for me, though I didn't dive too deeply into it.

Thank you very much! v3.2.1 released.

Awesome, thanks!