axlsx icon indicating copy to clipboard operation
axlsx copied to clipboard

cannot load such file zip/zip

Open robahl opened this issue 11 years ago • 34 comments

I just installed axlsx through rubygems. But when I go into irb and try to require 'axlsx' it says cannot load such file zip/zip. Any ideas?

Using Ruby 2.0

robahl avatar Sep 06 '13 23:09 robahl

Yes, sorry. The current release is not restrictive enough in pinning the version of rubyzip and their latest release has some major changes in code structure. Can I ask you to use master on github while I work on release prep?

randym avatar Sep 07 '13 02:09 randym

To fix it temporally, try adding

gem 'rubyzip', '< 1.0.0'

in your Gemfile.

See rubyzip/rubyzip@652916025a136b84d47326680c244e41686be838

sakuro avatar Sep 07 '13 03:09 sakuro

Ah thanks, worked great on master. When will you release to rubygems?

robahl avatar Sep 07 '13 11:09 robahl

hell or high water, next thursday at the latest.

randym avatar Sep 07 '13 17:09 randym

Why is this closed? I'm having the exact same issue with axlsx 1.3.6.

joongimin avatar Dec 15 '13 06:12 joongimin

Ok I reopen it, can someone else confirm that the problem still occurs with latest axlsx?

robahl avatar Dec 15 '13 09:12 robahl

Still happens

cannot load such file -- zip/zip /gems/axlsx-1.3.6/lib/axlsx.rb:26

rubyzip 1.1.0 axlsx 1.3.6

carlaares avatar Dec 17 '13 16:12 carlaares

Still happening here for axlsx 1.3.6.

Pointing to master as a temporary fix.

dubilla avatar Dec 27 '13 19:12 dubilla

Still happening here too for axlsx 1.3.6 Cannot use rubyzip < 1.0.0 as some of my other gems have dependencies with rubyzip > 1.0.0

begault avatar Jan 03 '14 17:01 begault

The temporary solution would be to add rubyzip compatibility gem

gem 'zip-zip' 

kabturek avatar Feb 21 '14 08:02 kabturek

Evaluating Axlsx now. Getting above error for the same reasons as above. I have switched to a fork of master for now, but this is not a good long term solution. What is the delay on offering an actual release with this fix? It makes me nervous using master if it isn't considered release ready.

tbtalbottjr avatar Sep 16 '14 18:09 tbtalbottjr

@kabturek :+1:

russellsilva avatar Nov 24 '14 18:11 russellsilva

I've just released a pre-release version. (v2.1.0.pre) Please test it and report if you have any problems

jurriaan avatar Mar 14 '15 15:03 jurriaan

happens to me as well (v 1.3.6)

jacek213 avatar May 12 '15 12:05 jacek213

Ok I see you are struggling with this issue from years. I have the same problem (v 1.3.6)

clopatofsky avatar Jun 11 '15 06:06 clopatofsky

I have the same problem 😞.

But with 2.1.0.pre it works.

patricks avatar Aug 05 '15 07:08 patricks

I have this problem now. Here's from my Gemfile.lock:

    acts_as_xlsx (1.0.6)
      activerecord (>= 2.3.9)
      axlsx (>= 1.0.13)
      i18n (>= 0.4.1)

I have solved it for now with this:

gem 'zip' # Needed by axlsx
gem 'axlsx_rails' # Provide templates for the axlsx gem

jmuheim avatar Oct 28 '15 19:10 jmuheim

Adding: gem 'zip-zip' worked for me:

From Gemfile.lock

axlsx (1.3.6)
      htmlentities (~> 4.3.1)
      nokogiri (>= 1.4.1)
      rubyzip (>= 0.9.5)
...
zip-zip (0.3)
      rubyzip (>= 1.0.0)

bsimpson avatar Nov 12 '15 16:11 bsimpson

Also having this issue. Is v2.1.0 available as an installable gem?

retorquere avatar Aug 08 '16 11:08 retorquere

i added on my Gemfile ruby gem 'zip-zip' thanks, the problem solved

mirzalazuardi avatar Aug 18 '16 09:08 mirzalazuardi

Getting the same error with axlsx 2.0.1 and roo 2.4.0 on ruby 2.3.3and rails 4.1.9.

Bundler could not find compatible versions for gem "rubyzip":
  In Gemfile:
    axlsx (~> 2.0.1) was resolved to 2.0.1, which depends on
      rubyzip (~> 1.0.0)

    roo (~> 2.4.0) was resolved to 2.4.0, which depends on
      rubyzip (< 2.0.0, ~> 1.1)

Adding gem zip or gem zip-zip to Gemfile doesn't solve the issue. I tried to update the roo gem to 2.7.1 and still didn't work. Removing roo or axlsx stops the bundler error.

After some search I tried to update axlsx to 2.1.0.pre, but bundler still kept broken.

The only possible way to make it work here was removing roo, running bundle install, adding axlsl 2.1.0.pre (yeah, only works for 2.1.0.pre), running bundle install again and then adding roo. In this specific sequence bundler runs without any issues.

Hope this help someone!

iujisato avatar Feb 01 '17 19:02 iujisato

I confirm that the issue is still happening and that @iujisato solution works for me

diegoesp avatar Feb 05 '17 17:02 diegoesp

@iujisato thanks.

1v avatar May 30 '17 00:05 1v

This worked for me

gem 'rubyzip', '>= 1.2.1' # axlsx dep
gem 'axlsx', git: 'https://github.com/randym/axlsx.git', ref: '776037c0fc799bb09da8c9ea47980bd3bf296874'

grammakov avatar Sep 11 '17 10:09 grammakov

This worked for me

gem 'axlsx_rails'
gem 'zip-zip'

benry62 avatar Apr 10 '18 16:04 benry62

Still a problem with latest version. Including zip-zip works. Can't this be fixed?

rept avatar Nov 26 '18 12:11 rept

2019 and still reporting this problem.

omenking avatar Jan 12 '19 18:01 omenking

Surely everyone using this gem has their own private fork by now.

inopinatus avatar Jan 12 '19 18:01 inopinatus

+1 here

shlima avatar Jun 26 '19 13:06 shlima

2020, the baby issue has grown and now speaks for itself

cassiopagnoncelli avatar Jan 28 '20 03:01 cassiopagnoncelli