简体   繁体   English

Bundler找不到宝石“ ruby​​zip”的兼容版本

[英]Bundler could not find compatible versions for gem “rubyzip”

I tried to add docx-html gem to my project and here's what I get while bundle install : 我试图将docx-html gem添加到我的项目中,这就是bundle install得到的内容:

Bundler could not find compatible versions for gem "rubyzip": In Gemfile: zip-zip (>= 0) ruby depends on rubyzip (>= 1.0.0) ruby Bundler找不到与“ ruby​​zip”宝石兼容的版本:在Gemfile中:zip-zip(> = 0)ruby取决于rubyzip(> = 1.0.0)ruby

 docx-html (>= 0) ruby depends on docx (~> 0.1.0) ruby depends on rubyzip (0.9.1) 

Part of my Gemfile: 我的Gemfile的一部分:

gem 'rubyzip'
gem 'zip-zip'
gem 'docx_replace'

I added the line gem 'zip-zip' by an advice from another StackOverflow question. 我通过另一个StackOverflow问题的建议添加了gem 'zip-zip'行。 If I exclude it, instead of bundle install error I get the following error while trying to start the server: 如果我排除它,而不是捆绑安装错误,则在尝试启动服务器时出现以下错误:

`require': cannot load such file -- zip `require':无法加载此类文件-zip

How do I get rid of these errors while keeping gem docx_replace? 如何在保留gem docx_replace的同时消除这些错误?

I haven't yet figured out why, but for some reason changing Gemfile code to this worked: 我还没有弄清楚为什么,但是出于某种原因,将Gemfile代码更改为可行的:

gem 'zip'
gem 'docx_replace'

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM