我在Windows 7中的ruby版本:
> ruby -v
ruby 2.3.1p112 (2016-04-26 revision 54768) [i386-mingw32]
当我列出gem系统资源时,我会看到HTTPS和HTTP资源:
> gem sources --list
*** CURRENT SOURCES ***
https://rubygems.org/
http://rubygems.org
现在我想只留下HTTP源:
> gem sources --remove https://rubygems.org
source https://rubygems.org not present in cache
> gem sources --add http://rubygems.org
https://rubygems.org is recommended for security over http://rubygems.org
Do you want to add this insecure source? [yn] y
source http://rubygems.org already present in the cache
请帮助我了解如何完成任务。他们必须完成。
答案 0 :(得分:0)
gem sources --remove
需要完全匹配才能删除源。尝试将您的第一个命令更改为 gem sources --remove https://rubygems.org/
(直接从 gem sources --list
输出中复制/粘贴)。