gpt4 book ai didi

ruby-on-rails - "Gem::RemoteFetcher::UnknownHostError"安装 Rails 版本 3.2.15 时

转载 作者:行者123 更新时间:2023-12-04 01:36:29 25 4
gpt4 key购买 nike

我之前已经在具有数据持久性的实时 ubuntu USB 上成功安装了 rails 3.2.15。

现在我已经习惯了操作系统( Ubuntu 12.04 LTS ),我已经将它安装在笔记本电脑上,并且正在安装我在实时 USB 中使用的东西。

长话短说,我在安装 Rails 时遇到了问题。我使用相同的说明来安装 ruby​​ 和 rails 与 live usb 中的说明相同:http://ryanbigg.com/2010/12/ubuntu-ruby-rvm-rails-and-you/

但是,我在安装 rails 时收到此错误:

ERROR: While executing gem ... (Gem::RemoteFetcher::UnknownHostError) no such name (https://api.rubygems.org/api/v1/dependencies?gems=activemodel)



我已经使用 -V 来查看发生了什么,但是,作为一般的技术菜鸟,我不知道出了什么问题。

这是 -V 给出的:

~$ gem install rails -V 3.2.15 HEAD https://api.rubygems.org/latest_specs.4.8.gz 302 Moved Temporarily HEAD https://s3.amazonaws.com/production.s3.rubygems.org/latest_specs.4.8.gz 200 OK GET https://api.rubygems.org/latest_specs.4.8.gz 302 Moved Temporarily GET https://s3.amazonaws.com/production.s3.rubygems.org/latest_specs.4.8.gz 200 OK HEAD https://api.rubygems.org/latest_specs.4.8.gz 302 Moved Temporarily HEAD https://s3.amazonaws.com/production.s3.rubygems.org/latest_specs.4.8.gz 304 Not Modified GET https://api.rubygems.org/quick/Marshal.4.8/rails-4.0.2.gemspec.rz 302 Moved Temporarily GET https://bb-m.rubygems.org/quick/Marshal.4.8/rails-4.0.2.gemspec.rz 200 OK HEAD https://api.rubygems.org/api/v1/dependencies 302 Moved Temporarily HEAD https://bundler.rubygems.org/api/v1/dependencies 200 OK HEAD https://api.rubygems.org/api/v1/dependencies 302 Moved Temporarily HEAD https://bundler.rubygems.org/api/v1/dependencies 200 OK GET https://api.rubygems.org/api/v1/dependencies?gems=rails 302 Moved Temporarily GET https://bundler.rubygems.org/api/v1/dependencies?gems=rails 200 OK GET https://api.rubygems.org/api/v1/dependencies?gems=rails 302 Moved Temporarily GET https://bundler.rubygems.org/api/v1/dependencies?gems=rails 200 OK GET https://api.rubygems.org/api/v1/dependencies?gems=railties 302 Moved Temporarily GET https://bundler.rubygems.org/api/v1/dependencies?gems=railties 200 OK GET https://api.rubygems.org/api/v1/dependencies?gems=railties 302 Moved Temporarily GET https://bundler.rubygems.org/api/v1/dependencies?gems=railties 200 OK GET https://api.rubygems.org/api/v1/dependencies?gems=actionmailer 302 Moved Temporarily GET https://bundler.rubygems.org/api/v1/dependencies?gems=actionmailer 200 OK GET https://api.rubygems.org/api/v1/dependencies?gems=actionmailer 302 Moved Temporarily GET https://bundler.rubygems.org/api/v1/dependencies?gems=actionmailer 200 OK GET https://api.rubygems.org/api/v1/dependencies?gems=activerecord 302 Moved Temporarily GET https://bundler.rubygems.org/api/v1/dependencies?gems=activerecord 200 OK GET https://api.rubygems.org/api/v1/dependencies?gems=activerecord 302 Moved Temporarily GET https://bundler.rubygems.org/api/v1/dependencies?gems=activerecord 200 OK GET https://api.rubygems.org/api/v1/dependencies?gems=actionpack 302 Moved Temporarily GET https://bundler.rubygems.org/api/v1/dependencies?gems=actionpack 200 OK GET https://api.rubygems.org/api/v1/dependencies?gems=actionpack 302 Moved Temporarily GET https://bundler.rubygems.org/api/v1/dependencies?gems=actionpack 200 OK GET https://api.rubygems.org/api/v1/dependencies?gems=activesupport 302 Moved Temporarily GET https://bundler.rubygems.org/api/v1/dependencies?gems=activesupport 200 OK GET https://api.rubygems.org/api/v1/dependencies?gems=activesupport 302 Moved Temporarily GET https://bundler.rubygems.org/api/v1/dependencies?gems=activesupport 200 OK GET https://api.rubygems.org/api/v1/dependencies?gems=activemodel 302 Moved Temporarily GET https://bundler.rubygems.org/api/v1/dependencies?gems=activemodel 200 OK ERROR: While executing gem ... (Gem::RemoteFetcher::UnknownHostError) no such name (https://api.rubygems.org/api/v1/dependencies?gems=activemodel)



任何人都可以帮忙吗?

附加信息:

使用:

ruby 2.1.0p0 (2013-12-25 修订版 44422) [i686-linux]

rvm 1.25.15(稳定版)作者:Wayne E. Seguin,Michal Papis [https://rvm.io/]

最佳答案

我遇到了同样的问题:Ubuntu 12.04,ruby 2.1.0 试图安装最新的 rails (4.0.x)。做 gem 安装 rails 我遇到了同样的错误。我做了什么:

  • 更新 ruby​​gem: gem 更新--系统它从 2.2.0 到 2.2.2
  • 找到过时的 gems ( gem outdated ) 并得到了几个过时的:bigdecimal (1.2.3 < 1.2.5)、minitest (4.7.5 < 5.2.3)、psych (2.0.2 < 2.0.4) , rake (10.1.0 < 10.1.1), rdoc (4.1.0 < 4.1.1), 测试单元 (2.1.0.0 < 2.5.5)
  • 更新 gem gem 更新
  • 使用 成功安装 rails gem install rails --no-ri --no-rdoc

  • rails -v 我得到了 Rails 4.0.3。

    关于ruby-on-rails - "Gem::RemoteFetcher::UnknownHostError"安装 Rails 版本 3.2.15 时,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21364283/

    25 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com