Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error to upload images using datashift_spree:load:images #58

Open
ghost opened this issue Apr 7, 2016 · 3 comments
Open

Error to upload images using datashift_spree:load:images #58

ghost opened this issue Apr 7, 2016 · 3 comments

Comments

@ghost
Copy link

ghost commented Apr 7, 2016

datashift_spree : 0.5.0

Was trying to upload images using sku. got following error

/home/vishal/.rvm/gems/ruby-2.2.4/gems/datashift-0.16.0/lib/loaders/paperclip/attachment_loader.rb:53:in `initialize': wrong number of arguments (4 for 1..3) (ArgumentError)
    from /home/vishal/.rvm/gems/ruby-2.2.4/gems/datashift_spree-0.5.0/lib/thor/spree/products_images.thor:146:in `new'
    from /home/vishal/.rvm/gems/ruby-2.2.4/gems/datashift_spree-0.5.0/lib/thor/spree/products_images.thor:146:in `images'
    from /home/vishal/.rvm/gems/ruby-2.2.4/gems/thor-0.19.1/lib/thor/command.rb:27:in `run'
    from /home/vishal/.rvm/gems/ruby-2.2.4/gems/thor-0.19.1/lib/thor/invocation.rb:126:in `invoke_command'
    from /home/vishal/.rvm/gems/ruby-2.2.4/gems/thor-0.19.1/lib/thor.rb:359:in `dispatch'
    from /home/vishal/.rvm/gems/ruby-2.2.4/gems/thor-0.19.1/lib/thor/base.rb:440:in `start'
    from /home/vishal/.rvm/gems/ruby-2.2.4/gems/thor-0.19.1/lib/thor/runner.rb:36:in `method_missing'
    from /home/vishal/.rvm/gems/ruby-2.2.4/gems/thor-0.19.1/lib/thor/command.rb:29:in `run'
    from /home/vishal/.rvm/gems/ruby-2.2.4/gems/thor-0.19.1/lib/thor/command.rb:126:in `run'
    from /home/vishal/.rvm/gems/ruby-2.2.4/gems/thor-0.19.1/lib/thor/invocation.rb:126:in `invoke_command'
    from /home/vishal/.rvm/gems/ruby-2.2.4/gems/thor-0.19.1/lib/thor.rb:359:in `dispatch'
    from /home/vishal/.rvm/gems/ruby-2.2.4/gems/thor-0.19.1/lib/thor/base.rb:440:in `start'
    from /home/vishal/.rvm/gems/ruby-2.2.4/gems/thor-0.19.1/bin/thor:6:in `<top (required)>'
    from /home/vishal/.rvm/gems/ruby-2.2.4/bin/thor:23:in `load'
    from /home/vishal/.rvm/gems/ruby-2.2.4/bin/thor:23:in `<main>'
    from /home/vishal/.rvm/gems/ruby-2.2.4/bin/ruby_executable_hooks:15:in `eval'
    from /home/vishal/.rvm/gems/ruby-2.2.4/bin/ruby_executable_hooks:15:in `<main>'

Wired thing is that lib/loaders/paperclip/attachment_loader.rb:53in 'initialize' method the have 3rd parameter as hash, then also throwing error.

@autotelik
Copy link
Owner

Hi .. please try with new datashift branch split_into_concerns .... so in Gemfile

gem 'datashift', github: 'autotelik/datashift', branch: 'split_into_concerns'

And example cmd line .. if you are matching file name based on sku and separated by ' _'

thor datashift:paperclip:attach -a Spree::Image -k Spree::Variant -f images --attach-to-find-by-field sku -i tmp/images/ --split_file_name_on _

@autotelik
Copy link
Owner

please post your actual cmd line if you still have issues ... thanks

@ghost
Copy link
Author

ghost commented Apr 7, 2016

@autotelik works with master branch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant