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

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

Open
Disha-Shah opened this issue Nov 14, 2017 · 3 comments
Open

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

Disha-Shah opened this issue Nov 14, 2017 · 3 comments

Comments

@Disha-Shah
Copy link

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.

@an-nasir
Copy link

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

@andreaslillebo
Copy link

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

@drusepth
Copy link
Contributor

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?

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

4 participants