Skip to content

Ruby 2.7.0: undefined method `new' for BigDecimal:Class #24

@matheusfillipe

Description

@matheusfillipe

With ruby 2.7.0 which is the default for ubuntu 20.04, most popular dropplet nowadays:

$ do_snapshot                                                                                                                
Start performing operations                                                                                                  
Loading list of DigitalOcean droplets                                                                                        
undefined method `new' for BigDecimal:Class                                                                                  
/var/lib/gems/2.7.0/gems/activesupport-4.2.11.3/lib/active_support/core_ext/object/duplicable.rb:111:in `<class:BigDecimal>':
 undefined method `new' for BigDecimal:Class (NoMethodError)                                                                 
        from /var/lib/gems/2.7.0/gems/activesupport-4.2.11.3/lib/active_support/core_ext/object/duplicable.rb:106:in `<top (r
equired)>'                                                                                                                   
        from /usr/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:72:in `require'                                         
        from /usr/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:72:in `require'                                         
        from /var/lib/gems/2.7.0/gems/activesupport-4.2.11.3/lib/active_support/core_ext/object.rb:3:in `<top (required)>'   
        from /usr/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:92:in `require'
        from /usr/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:92:in `require'
        from /var/lib/gems/2.7.0/gems/activesupport-4.2.11.3/lib/active_support/core_ext.rb:2:in `block in <top (required)>'
        from /var/lib/gems/2.7.0/gems/activesupport-4.2.11.3/lib/active_support/core_ext.rb:1:in `each'
        from /var/lib/gems/2.7.0/gems/activesupport-4.2.11.3/lib/active_support/core_ext.rb:1:in `<top (required)>'
        from /usr/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:72:in `require'
        from /usr/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:72:in `require'

I understand this might be coming from activesupport. You could add on the README.md that ruby 2.7 is not supported. I got it to run with rubenv after installing 2.6.4 btw.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions