fringd / zipline

A gem that lets you stream a zip file from rails
MIT License
289 stars 68 forks source link

uninitialized constant Admin::RolesController::Zipline #58

Closed henron1 closed 4 years ago

henron1 commented 4 years ago

Getting this error when I include the lib in the class per the readme.

fringd commented 4 years ago

what's the error?

henron1 commented 4 years ago

uninitialized constant Admin::RolesController::Zipline

fringd commented 4 years ago

what's Admin::RolesController? is that a rails thing?

henron1 commented 4 years ago

It's a controller I'm trying to use zipline in. It's not liking the "include Zipline"

fringd commented 4 years ago

I'm not sure exactly what's going on, but it's looking for Zipline in that namespace... can you paste the full file?

fringd commented 4 years ago

is the gem definitely installed?

henron1 commented 4 years ago

def role_legal_agreement_download urls = [] @role.people_casted.each do |person| person.agreements.each do |agreement| data = open(agreement.pdf.service_url) urls.push(data) end end zipline(urls, 'archive.zip') end ``

henron1 commented 4 years ago

I'm now getting an error Read error: #<NoMethodError: undefined methodtr' for nil:NilClass`

fringd commented 4 years ago

did you get it fixed?