Heim  >  Fragen und Antworten  >  Hauptteil

无法删除ruby 默认源

运行 gem sources --remove https://rubygems.org/,提示如下

source https://rubygems.org not present in cache

改不了源,抓狂呀,依赖包载不下来

ringa_leeringa_lee2712 Tage vor646

Antworte allen(5)Ich werde antworten

  • 伊谢尔伦

    伊谢尔伦2017-04-22 08:57:50

    可能源已经被删除了。

    如 @请叫我汪二 说的,可以查看当前的源列表:

    gem sources
    # 或
    gem sources -l
    

    或者加入淘宝的ruby镜像源:

    gem sources -a http://ruby.taobao.org/
    

    Antwort
    0
  • ringa_lee

    ringa_lee2017-04-22 08:57:50

    先看一下当前源:gem source

    应该是http吧,改http试试?

    Antwort
    0
  • 伊谢尔伦

    伊谢尔伦2017-04-22 08:57:50

    gem source 看看源到底是什么字符串(应该是 https://rubygems.org/ 结尾有斜杠)

    然后执行 gem source --remove https://rubygems.org/

    Antwort
    0
  • 天蓬老师

    天蓬老师2017-04-22 08:57:50

    我是因为少了结尾的斜杠,因为声望不够不能给别人点赞

    Antwort
    0
  • 阿神

    阿神2017-04-22 08:57:50

    说得对,是后面少了斜杠/

    Antwort
    0
  • StornierenAntwort