我之前在带有数据持久性的实时ubuntu usb上成功安装了rails 3.2.15。
现在我已经习惯了os( Ubuntu 12.04 LTS ),我已经将它安装在笔记本电脑上,并且正在安装我在现场usb中使用的东西。
长话短说,我遇到安装Rails的问题。我使用了相同的说明来安装ruby和rails作为现场usb中的那个:http://ryanbigg.com/2010/12/ubuntu-ruby-rvm-rails-and-you/
但是,我在安装rails时遇到此错误:
错误:执行gem时...(Gem :: RemoteFetcher :: UnknownHostError) 没有这样的名字(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暂时移动 头 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已移动 暂时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已移动 暂时头 https://s3.amazonaws.com/production.s3.rubygems.org/latest_specs.4.8.gz 304未修改GET https://api.rubygems.org/quick/Marshal.4.8/rails-4.0.2.gemspec.rz 302 暂时移动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已移动 暂时抬头https://bundler.rubygems.org/api/v1/dependencies 200 OK HEAD https://api.rubygems.org/api/v1/dependencies 302已移动 暂时抬头https://bundler.rubygems.org/api/v1/dependencies 200 OK GET https://api.rubygems.org/api/v1/dependencies?gems=rails 302 暂时移动GET https://bundler.rubygems.org/api/v1/dependencies?gems=rails 200 OK GET https://api.rubygems.org/api/v1/dependencies?gems=rails 302已移动 暂时GET https://bundler.rubygems.org/api/v1/dependencies?gems=rails 200 OK GET https://api.rubygems.org/api/v1/dependencies?gems=railties 302已移动 暂时GET https://bundler.rubygems.org/api/v1/dependencies?gems=railties 200好的 获取https://api.rubygems.org/api/v1/dependencies?gems=railties 302 暂时移动GET https://bundler.rubygems.org/api/v1/dependencies?gems=railties 200好的 获取https://api.rubygems.org/api/v1/dependencies?gems=actionmailer 302 暂时移动GET https://bundler.rubygems.org/api/v1/dependencies?gems=actionmailer 200 OK GET https://api.rubygems.org/api/v1/dependencies?gems=actionmailer 302暂时移动GET https://bundler.rubygems.org/api/v1/dependencies?gems=actionmailer 200 OK GET https://api.rubygems.org/api/v1/dependencies?gems=activerecord 302暂时移动GET https://bundler.rubygems.org/api/v1/dependencies?gems=activerecord 200 OK GET https://api.rubygems.org/api/v1/dependencies?gems=activerecord 302暂时移动GET https://bundler.rubygems.org/api/v1/dependencies?gems=activerecord 200 OK GET https://api.rubygems.org/api/v1/dependencies?gems=actionpack 302暂时移动GET https://bundler.rubygems.org/api/v1/dependencies?gems=actionpack 200 OK GET https://api.rubygems.org/api/v1/dependencies?gems=actionpack 302暂时移动GET https://bundler.rubygems.org/api/v1/dependencies?gems=actionpack 200 OK GET https://api.rubygems.org/api/v1/dependencies?gems=activesupport 302暂时移动GET https://bundler.rubygems.org/api/v1/dependencies?gems=activesupport 200 OK GET https://api.rubygems.org/api/v1/dependencies?gems=activesupport 302 暂时移动GET https://bundler.rubygems.org/api/v1/dependencies?gems=activesupport 200 OK GET https://api.rubygems.org/api/v1/dependencies?gems=activemodel 302 暂时移动GET https://bundler.rubygems.org/api/v1/dependencies?gems=activemodel 200 OK ERROR:执行gem时...... (宝石:: RemoteFetcher :: UnknownHostError) 没有这样的名字(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/]
答案 0 :(得分:19)
我遇到了同样的问题:Ubuntu 12.04,ruby 2.1.0试图安装最新的rails(4.0.x)。做 gem install rails 我得到了同样的错误。我做了什么:
在 rails -v ,我得到了Rails 4.0.3。
答案 1 :(得分:5)
可能是错误的,因为家里的互联网非常间歇性。当我在工作中使用互联网连接时,安装进行得很顺利。