Gem 损坏:未找到中央目录签名的 Zip 结尾

发布于 2025-01-14 14:14:26 字数 513 浏览 2 评论 0原文

我是 Ruby 新手,从未使用过 gem 文件。我必须离线安装一些 gem 文件。不幸的是,我遵循了另一个过程,而不是遵循文档,所以我编写了一个脚本来遍历安装目录的文件夹“gem”,并首先运行“build”,然后运行“install --force --local ”。 “干净”的方式将只运行最后一个命令,但在安装目录的“缓存”文件夹中。 我怀疑这损坏了我的宝石。事实上,当运行我的软件(基于此 gems)时,我收到此错误:

/var/lib/gems/2.6.0/gems/rubyzip-1.3.0/lib/zip/central_directory.rb:143:in `get_e_o_c_d': Zip end of central directory signature not found (Zip::Error)

我唯一的想法是清理并重新安装 gems,但我知道 bundle clean --force 不能那么容易使用,因为它还可以破坏与最后安装无关的其他宝石。

您有什么建议吗? 谢谢

i'm new with Ruby and i never used gem files. I had to install offline some gem files. Unfortunately i followed another procedure, instead of following the documentation so i wrote a script to go through the folder "gem" of my installation directory and run first "build" and then "install --force --local ". The "clean" way would have been running just this last command but in the "cache" folder of the installation directory.
I suspect this corrupted my gems. In fact, when running my software (based on this gems) i get this error:

/var/lib/gems/2.6.0/gems/rubyzip-1.3.0/lib/zip/central_directory.rb:143:in `get_e_o_c_d': Zip end of central directory signature not found (Zip::Error)

The only idea i've is to clean up and re-install the gems, but i know that bundle clean --force can not be used that easily, since it can destroy also other gems not related with this last installation.

Do you have any suggestions?
Thank you

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文