简体   繁体   English

Rails ERROR:执行时(Gem :: RemoteFetcher :: UnknownHostError)

[英]Rails ERROR: While executing (Gem::RemoteFetcher::UnknownHostError)

I try to install rails with command gem install rails --no-ri --no-rdoc and then error occur.Below is output of error 我尝试使用命令gem install rails --no-ri --no-rdoc安装rails,然后发生错误.Below输出错误

gem install rails --no-ri --no-rdoc
Fetching: multi_json-1.7.8.gem (100%)
Successfully installed multi_json-1.7.8
Fetching: tzinfo-0.3.37.gem (100%)
Successfully installed tzinfo-0.3.37
Fetching: atomic-1.1.12.gem (100%)
Building native extensions.  This could take a while...
Successfully installed atomic-1.1.12
Fetching: thread_safe-0.1.2.gem (100%)
Successfully installed thread_safe-0.1.2
Fetching: activesupport-4.0.0.gem (100%)
Successfully installed activesupport-4.0.0
Fetching: builder-3.1.4.gem (100%)
Successfully installed builder-3.1.4
Fetching: rack-1.5.2.gem (100%)
Successfully installed rack-1.5.2
ERROR:  While executing gem ... (Gem::RemoteFetcher::UnknownHostError)
no such name (https://rubygems.org/gems/rack-test-0.6.2.gem)

What should i do to solve this problem? 我该怎么做才能解决这个问题?

It looks like your source either isn't responding properly or the gem can't be found at the source. 看起来你的来源要么没有正确回应,要么在源头找不到宝石。

Try gem install rack-test . 尝试gem install rack-test If that gives you an error try switching the source you're getting the gem from. 如果这给你一个错误,请尝试切换你从中得到宝石的来源。

First add the source gem source -a 'https://production.cf.rubygems.org' 首先添加源gem source -a 'https://production.cf.rubygems.org'

Then try installing again. 然后再次尝试安装。

OR 要么

You could try installing directly from a different source with gem install rack-test --source 'https://production.cf.rubygems.org' 您可以尝试使用gem install rack-test --source 'https://production.cf.rubygems.org'直接从其他来源gem install rack-test --source 'https://production.cf.rubygems.org'

Once you get that gem to install properly, try installing rails again. 一旦您正确安装该gem,请尝试再次安装rails。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 安装 Rails 或 gem 更新时出现错误 (Gem::RemoteFetcher::UnknownHostError) - Getting error (Gem::RemoteFetcher::UnknownHostError) while installing Rails or gem update 安装Rails版本3.2.15时出现“Gem :: RemoteFetcher :: UnknownHostError” - “Gem::RemoteFetcher::UnknownHostError” while installing Rails version 3.2.15 Gem :: RemoteFetcher :: UnknownHostError:没有这样的名称 - Gem::RemoteFetcher::UnknownHostError: no such name 在执行gem时出现……(Gem :: RemoteFetcher :: FetchError)尝试安装Rails时出现503错误 - Getting a While executing gem … (Gem::RemoteFetcher::FetchError) 503 error when attempting to install rails gem install rails ERROR:执行gem时...(Errno :: EACCES) - gem install rails ERROR: While executing gem … (Errno::EACCES) 错误:执行gem时...(Errno :: EISDIR)gem install rails - ERROR: While executing gem … (Errno::EISDIR) gem install rails 安装滑轨时的Gem :: RemoteFetcher :: FetchErro - Gem::RemoteFetcher::FetchErro when installing rails 执行gem install rails时如何解决错误 - How to resolve error while executing gem install rails 使用gem安装Rails时出错 - Error while installing Rails with gem 错误:执行gem时...(ArgumentError)IPv4地址期望4个字节但1个字节-Ruby On Rails - ERROR: While executing gem … (ArgumentError) IPv4 address expects 4 bytes but 1 bytes - Ruby On Rails
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM