且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

更新Ruby-Gems时出现未知的主机错误

更新时间:2023-01-06 14:16:02

不确定您已安装的rubygems版本,但有三种解决方法:


  1. 网络问题 - 请稍后再试。 更新,你将需要安装另一种方式

    注意:当没有安装rubygems-update时,RubyGems 1.1和1.2会有升级问题。如果您看不到要更新的内容,则需要使用以下说明。如果您安装了旧版本的RubyGems,那么您仍然可以分两步进行:

    $ gem install ruby​​gems-update#可能需要为admin / root



    $ update_rubygems

  2. https://rubygems.org/pages/download 下载
  3. 解压缩到一个目录并在那里cd

  4. 使用:ruby setup.rb安装(您可能需要admin / root权限)
  5. li>

请参阅 https:// rubygems.org/pages/download 了解更多信息

I am trying to update ruby gems by using:

gem update --system 

But I am getting error:

ERROR: While executing gem ...(Gem::RemoteFetcher::UnknownHostError) no such name (https://rubygems.org/specs.4.8.gz).

Unsure what version of rubygems you have installed, however there are three ways to fix:

  1. network issues - try again later.
  2. the version you have is bricked for updates, and you will need to install another way

    NOTE: RubyGems 1.1 and 1.2 have problems upgrading when there is no rubygems-update installed. You will need to use the following instructions if you see Nothing to update. If you have an older version of RubyGems installed, then you can still do it in two steps:

    $ gem install rubygems-update # might need to be admin/root

    $ update_rubygems

  3. Failing that you have to get your hands dirty:

See https://rubygems.org/pages/download for more info