treat icon indicating copy to clipboard operation
treat copied to clipboard

Unable to install - cannot load such file -- zip/zip (LoadError)

Open Disha-Shah opened this issue 6 years ago • 3 comments

I want to install Treat in my Rails 5.1 - API only app, but I am unable to install 'treat'. After adding in Gemfile, it succeeded in bundle install.

After that as mentioned in manual, I started IRB to run the commands but it throws me following error -

/home/stldev/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/activesupport-5.1.4/lib/active_support/dependencies.rb:292:in require': cannot load such file -- zip/zip (LoadError) from /home/stldev/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/activesupport-5.1.4/lib/active_support/dependencies.rb:292:in block in require' from /home/stldev/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/activesupport-5.1.4/lib/active_support/dependencies.rb:258:in `load_dependency'

I am using Roo gem in the project which also internally uses zip. Is the version used conflicting with treat? Any help will really be appreciated.

Disha-Shah avatar Nov 14 '17 10:11 Disha-Shah

I am facing the same issue on rails gem 'rails', '~> 5.1.4'

an-nasir avatar Jan 26 '18 05:01 an-nasir

Adding the following to the Gemfile seems to solve the problem:

gem 'rubyzip', '>= 1.0.0' # will load new rubyzip version
gem 'zip-zip' # will load compatibility for old rubyzip API.

Check out the readme for rubyzip for more details: https://github.com/rubyzip/rubyzip

andreaslillebo avatar Aug 30 '18 14:08 andreaslillebo

That does indeed solve the problem... but shouldn't those dependencies ideally be added to the gem itself, rather than in every app that uses the gem?

drusepth avatar Feb 25 '19 07:02 drusepth