2014-01-26 71 views
11

我已經成功安裝rails 3.2.15以前的數據持久性的實時ubuntu usb。「Gem :: RemoteFetcher :: UnknownHostError」在安裝Rails版本3.2.15時

現在我已經習慣了操作系統(Ubuntu 12.04 LTS),我已經將它安裝在筆記本電腦上,並且安裝了我用在活的USB中的東西。

長話短說,我遇到了安裝Rails的問題。我用同樣的說明來安裝Ruby和Rails作爲一個在現場的usb:http://ryanbigg.com/2010/12/ubuntu-ruby-rvm-rails-and-you/

但是,安裝護欄,當我得到這個錯誤:

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

我用-V看看發生了什麼,但是,作爲一個普遍的科技noob,我不知道什麼是錯的。

這裏是-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)

任何人都可以幫忙嗎?

附加信息:

使用:

紅寶石2.1.0p0(2013年12月25日修訂版44422)[i686的Linux的]

RVM 15年1月25日(穩定)由韋恩E. Seguin,Michal Papis [https://rvm.io/]

回答

5

可能是錯誤的,因爲家裏的互聯網非常間歇。當我在工作中使用互聯網連接時,安裝進行得很順利。

19

我有同樣的問題:Ubuntu 12.04,ruby 2.1.0試圖安裝最新的rails(4.0.x)。做寶石安裝軌道我得到同樣的錯誤。我所做的:

  • 更新rubygem:寶石更新並將其從2.2.0去2.2.2
  • 位於過時的寶石(寶石過時)--system,並得到一些過時:的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)
  • 更新寶石與寶石更新
  • 寶石成功地安裝導軌安裝--no裏--no-的RDoc

軌在軌-v我的Rails 4.0.3。

+5

我認爲我收到的錯誤是因爲我使用的互聯網連接非常間歇。當我回去工作時,安裝進行得很順利。 – osse

+0

如果項目是由捆綁商管理的,也請查看https://github.com/carsomyr/rbenv-bundler –

相關問題