Skip to content

Model#import method name clashes with activerecord-import library #1011

Open
@scarrick68

Description

@scarrick68

The import method is shadowed by activerecord-import which results in this argument error:
ArgumentError: Invalid arguments! from /some_local_path/activerecord-import-1.2.0/lib/activerecord-import/import.rb:648:in import_helper'`

Ruby doesn't support method overloading so it doesn't recognize any other definition. I'm guessing only the most recent for that class / module. Just wanted to point this out for anyone who runs into the same issue since AR import gem is pretty popular, 47 MM downloads.

My hot fix was to remove AR import, bundle and run the import. This won't work for anyone who runs a periodic import job.

I'd be happy to alias the method and make a PR.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions