Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unknown Host Error while updating Ruby-Gems

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).

like image 609
SUBHASH SAURABH Avatar asked Jan 11 '17 17:01

SUBHASH SAURABH


1 Answers

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:

    • Download from https://rubygems.org/pages/download
    • Unpack into a directory and cd there
    • Install with: ruby setup.rb (you may need admin/root privilege)

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

like image 105
Peter H. Boling Avatar answered Nov 13 '22 03:11

Peter H. Boling