search

Home  >  Q&A  >  body text

无法删除ruby 默认源

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

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

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

ringa_leeringa_lee2778 days ago704

reply all(5)I'll reply

  • 伊谢尔伦

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

    The source may have been deleted.

    As @Please call me Wang Er said, you can view the current source list:

    gem sources
    # 或
    gem sources -l
    

    Or join Taobao’s ruby ​​mirror source:

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

    reply
    0
  • ringa_lee

    ringa_lee2017-04-22 08:57:50

    Let’s take a look at the current source first: gem source

    It should be http, try changing it to http?

    reply
    0
  • 伊谢尔伦

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

    gem source See what string the source is (it should be https://rubygems.org/ with a slash at the end)

    Then execute gem source --remove https://rubygems.org/

    reply
    0
  • 天蓬老师

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

    It’s because I’m missing the trailing slash and I don’t have enough reputation to give likes to others

    reply
    0
  • 阿神

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

    You’re right, there’s a slash/

    at the end

    reply
    0
  • Cancelreply