无法通过rvm安装rubygems

时间:2021-09-16 07:16:07

I'm a noob in ruby and i'm trying to setup Ruby on Rails on ubuntu 12.04. I'm following steps as given in this site https://www.digitalocean.com/community/articles/how-to-install-ruby-on-rails-on-ubuntu-12-04-lts-precise-pangolin-with-rvm

我是ruby中的菜鸟,我正在尝试在ubuntu 12.04上设置Ruby on Rails。我正按照本网站提供的步骤进行操作https://www.digitalocean.com/community/articles/how-to-install-ruby-on-rails-on-ubuntu-12-04-lts-precise-pangolin-与-RVM

But whenever i try to run this command > rvm rubygems current i get an error

但无论何时我尝试运行此命令> rvm ruby​​gems current我都会收到错误

"Retrieving rubygems- There is no checksum for 'http://production.cf.rubygems.org/rubygems/rubygems-.tgz' or 'rubygems-.tgz', it's not possible to validate it. If you wish to continue with unverified download add '--verify-downloads 1' after the command."

“检索rubygems-没有'http://production.cf.rubygems.org/rubygems/rubygems-.tgz'或'rubygems-.tgz'的校验和,它无法验证它。如果你想继续未经证实的下载命令后添加'--verify-downloads 1'。“

Any help on this on how to proceed.

关于如何进行的任何帮助。

5 个解决方案

#1


15  

It looks like a bug, but it most likely is fixed already as I can not reproduce it, update RVM and try again:

它看起来像一个bug,但它很可能已经修复,因为我无法重现它,更新RVM并再试一次:

rvm get stable
rvm rubygems current

#2


7  

I had this problem and running rvm rubygems current get the similar error. It was trying to install version 1.8.25. I went to Rubygems website and saw the latest version there was 1.8.24. So I ran rvm rubygems 1.8.24 and it solve the issue, I can install other rubies with RVM normally. Hope that helps

我有这个问题,运行rvm ruby​​gems当前得到类似的错误。它试图安装1.8.25版本。我去了Rubygems网站,看到最新版本有1.8.24。所以我运行rvm ruby​​gems 1.8.24并解决了这个问题,我可以正常安装其他红宝石和RVM。希望有所帮助

#3


2  

I have had the same issue, but I figured out that combining steps here and here that you can fix the install.

我遇到了同样的问题,但我发现在这里和这里结合使用可以修复安装的步骤。

Here are the steps in the order that I completed them and got a clean install:

以下是我完成它们并进行全新安装的顺序中的步骤:

rvm remove ruby
rvm implode
curl -L https://get.rvm.io | bash -s stable --ruby
rvm reload
rvm install 1.9.3
rvm get head && rvm-smile
rvm rubygems latest

rvm install 1.9.3 will fail at the gems install again, but continue on with the next step, and it will be ok.

rvm install 1.9.3将再次在gems安装失败,但继续下一步,它就可以了。

Run gems list to see that the install worked, and if you'd like to be extra sure, go ahead and install another specific gem and then run gems list again.

运行gems list以查看安装是否有效,如果您想更加确定,请继续安装另一个特定的gem,然后再次运行gems list。

#4


0  

Yep, you could use inline RubyGems version (1.8.23 or 1.8.24) define:

是的,您可以使用内联RubyGems版本(1.8.23或1.8.24)定义:

rvm_rubygems_version=1.8.24 rvm install ruby

Or also with specific Ruby version:

或者还有特定的Ruby版本:

rvm_rubygems_version=1.8.24 rvm install ruby 1.9.3

#5


0  

As rvm.io website suggests, I installed the rvm using:

正如rvm.io网站建议的那样,我使用以下命令安装了rvm:

\curl -L https://get.rvm.io | bash -s stable --ruby

and got the same error as described in the question. I then re-ran:

并得到与问题中描述的相同的错误。然后我重新跑了:

\curl -L https://get.rvm.io | bash -s stable --ruby

and the problem gone and installation finished successfully. So not sure what caused this, I suggest to re-try the install command.

问题消失了,安装成功完成。所以不确定是什么导致了这个,我建议重新尝试安装命令。

#1


15  

It looks like a bug, but it most likely is fixed already as I can not reproduce it, update RVM and try again:

它看起来像一个bug,但它很可能已经修复,因为我无法重现它,更新RVM并再试一次:

rvm get stable
rvm rubygems current

#2


7  

I had this problem and running rvm rubygems current get the similar error. It was trying to install version 1.8.25. I went to Rubygems website and saw the latest version there was 1.8.24. So I ran rvm rubygems 1.8.24 and it solve the issue, I can install other rubies with RVM normally. Hope that helps

我有这个问题,运行rvm ruby​​gems当前得到类似的错误。它试图安装1.8.25版本。我去了Rubygems网站,看到最新版本有1.8.24。所以我运行rvm ruby​​gems 1.8.24并解决了这个问题,我可以正常安装其他红宝石和RVM。希望有所帮助

#3


2  

I have had the same issue, but I figured out that combining steps here and here that you can fix the install.

我遇到了同样的问题,但我发现在这里和这里结合使用可以修复安装的步骤。

Here are the steps in the order that I completed them and got a clean install:

以下是我完成它们并进行全新安装的顺序中的步骤:

rvm remove ruby
rvm implode
curl -L https://get.rvm.io | bash -s stable --ruby
rvm reload
rvm install 1.9.3
rvm get head && rvm-smile
rvm rubygems latest

rvm install 1.9.3 will fail at the gems install again, but continue on with the next step, and it will be ok.

rvm install 1.9.3将再次在gems安装失败,但继续下一步,它就可以了。

Run gems list to see that the install worked, and if you'd like to be extra sure, go ahead and install another specific gem and then run gems list again.

运行gems list以查看安装是否有效,如果您想更加确定,请继续安装另一个特定的gem,然后再次运行gems list。

#4


0  

Yep, you could use inline RubyGems version (1.8.23 or 1.8.24) define:

是的,您可以使用内联RubyGems版本(1.8.23或1.8.24)定义:

rvm_rubygems_version=1.8.24 rvm install ruby

Or also with specific Ruby version:

或者还有特定的Ruby版本:

rvm_rubygems_version=1.8.24 rvm install ruby 1.9.3

#5


0  

As rvm.io website suggests, I installed the rvm using:

正如rvm.io网站建议的那样,我使用以下命令安装了rvm:

\curl -L https://get.rvm.io | bash -s stable --ruby

and got the same error as described in the question. I then re-ran:

并得到与问题中描述的相同的错误。然后我重新跑了:

\curl -L https://get.rvm.io | bash -s stable --ruby

and the problem gone and installation finished successfully. So not sure what caused this, I suggest to re-try the install command.

问题消失了,安装成功完成。所以不确定是什么导致了这个,我建议重新尝试安装命令。