[英]Getting error (Gem::RemoteFetcher::UnknownHostError) while installing Rails or gem update
[英]Rails ERROR: While executing (Gem::RemoteFetcher::UnknownHostError)
我嘗試使用命令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)
我該怎么做才能解決這個問題?
看起來你的來源要么沒有正確回應,要么在源頭找不到寶石。
嘗試gem install rack-test
。 如果這給你一個錯誤,請嘗試切換你從中得到寶石的來源。
首先添加源gem source -a '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'
一旦您正確安裝該gem,請嘗試再次安裝rails。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.