简体   繁体   English

Ruby Bundler尝试重新安装已安装的Gem

[英]Ruby Bundler attempts to resinstall already installed Gem

I had to uninstall and rebuild json gem on my Windows machine, because the gem that was installed originally caused NoMethodError (described here ). 我必须在Windows机器上卸载并重建json gem,因为最初安装的gem导致了NoMethodError( 在此介绍)。 I issued the following commands: 我发出了以下命令:

gem uninstall json --all
gem install json --platform=ruby

This built json 1.4.6 and everything worked fine. 这构建了json 1.4.6,一切正常。 However, later I issued a bundler command: 但是,后来我发出了捆绑程序命令:

bundle update

I saw that Bundler reported "installing json (1.4.6)". 我看到Bundler报告“正在安装json(1.4.6)”。 After that the error came back, so I had to re-install json again. 之后错误又回来了,所以我不得不再次重新安装json。

I wonder what causes Bundler to reinstall the gem that is already present on the system with matching version number. 我想知道是什么原因导致Bundler重新安装系统上已经存在且具有匹配版本号的gem。

The reason is that bundler attempts to install the binary version of json for your platform, while you manually installed the ruby platform one (I believe to workaround other issues of JSON gem) 原因是捆绑程序尝试为您的平台安装json的二进制版本,而您手动安装了ruby平台(我认为这可以解决JSON gem的其他问题)

I will recommend you uninstall json gem that gets installed by bundler after your update. 我建议您在更新后卸载由捆绑程序安装的json gem。

bundle update
gem uninstall json --platform=x86-mingw32

Also raise this bug to Bundler developers in their issue tracker and their mailing list 同时在问题跟踪器邮件列表中向Bundler开发人员提出此错误

Sorry for not been more helpful, but there is no known answer to your issue. 抱歉,没有提供更多帮助,但您的问题尚无已知答案。

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

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