Skip to content

undefined method `unpack1' for String (NoMethodError) when use in ruby < 2.4 #315

Description

@xeruzo

i have a project use ruby 2.3.0, and is ok runing with prometheus before 4.2.3

but in the new version 4.2.3
i find it has new dependency the gem base64 >= 0
and the base64 is use unpack1 method

see this: https://github.com/ruby/base64/blob/v0.1.0/lib/base64.rb

and is now throw a error , can u think to remove dependency the gem base64 in next version or add only limit ruby >= 2.4 can use newest version?

ruby: 2.3.0p0
rails: 5.0.3

gemfile
....
gem 'puma-metrics', '1.2.0'
...

/usr/local/bundle/gems/base64-0.1.1/lib/base64.rb:59:in `decode64': undefined method `unpack1' for "**************":String (NoMethodError)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions