updating the ruby gem 1.8.5

我的未来我决定 提交于 2019-12-24 02:33:08

问题


hiii i am trying to update my gem file. Current version of gem is 1.8.5 When i am trying to update it using command " gem install rubygems-update -v 1.8.5 " it is giving following error **

ERROR: While executing gem ... (Gem::RemoteFetcher::FetchError) SocketError: getaddrinfo: Name or service not known (http://rubygems.org/gems/rubygems-update-1.8.5.gem)

**

I am working on ubuntu 10.04

also i tried to update using command " gem update --system " it is giving the error as below Updating rubygems-update **

ERROR: While executing gem ... (Gem::GemNotFoundException) Could not find a valid gem 'rubygems-update' (1.8.6) locally or in a repository

** i also tried the solution given on the link http://lightyearsoftware.com/2009/07/updating-rubygems-to-recent-1-3-x/

please help me to resolve the problem..


回答1:


If you are under Windows 7, run the command prompt as Administrator.

Read this thread. The error reported is the same of yours.

Try to apply the Google DNS configuration to your connection.

Otherwise you can try to install locally the gem, downloading it on rubygems.org. After this, in the directory you downloaded the gem, try to install it locally with the command: gem install gem_name --local




回答2:


I also had this error. I resolved it with

gem uninstall rubygems-update

(you may need to be sudo) and then reinstalled with

gem install rubygems-update

now it's working fine, hope this is helpful




回答3:


Try this:

  • Manually uninstall the gem you want to remove: gem uninstall [gemToUinistall]

  • Download the gem manually from http://rubygems.org/

  • try to install the gem from local : gem install [gemToInstall]



来源:https://stackoverflow.com/questions/6841473/updating-the-ruby-gem-1-8-5

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!