Skip to content

Hi! Unable to bundle argon2 gem with version 1.4.1 #32

@azimux

Description

@azimux

Hey hey!

When bumping ffi-compile to 1.4.1 today I notice this error:

NoMethodError: undefined method 'spec' for an instance of Gem::Specification (NoMethodError)

Taking a look, it's happening here in loader.rb:

 if defined?(Gem::Specification) &&
           (spec = Gem::Specification.find_active_stub_by_path(library)&.spec) &&

The object returned by Gem::Specification.find_active_stub_by_path is the actual specification itself best I can tell though I don't know if that's always true. But if I remove &.spec then the code works just fine. Won't bother with a PR since I'm not sure if removing &.spec is the right fix, or if we need to check if it's not a specification and call #spec in that case to convert it, or something else.

The library it's failing on is "libargon2_wrap.so" which gives the argon2 gem spec. Possibility that it's a bug in argon2 but figured I'd submit the issue here to see.

Cheers!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    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