Skip to content

Remote_table in spree 0.70.7 controller: #<TypeError: Zip is not a module> #17

@bsa7

Description

@bsa7

Hi!
I'm include gem 'remote_table' in my Gemfile (Rails 3.1.12)
In spree admin i'd create new controller:

class Admin::XlsPriceLoadsController < Admin::BaseController
  def upload
    source_xls = RemoteTable.new(filename)
    source_xls.each do |row|
      ....
    end
  end
end

but when this action fired, i'm see the next:

TypeError (Zip is not a module):
app/controllers/admin/xls_price_loads_controller.rb:26:in `upload'
...

when i'm explore the source_xls object, a frozen? property of them is true.

So, can any soul write me, why the parsed object is frozed?
And, if i run this code

 source_xls = RemoteTable.new(filename)
    source_xls.each do |row|
      ....
    end

from lib/tasks as rake task - all work fine!
All wo
Thanks for all advice!

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