简体   繁体   中英

Unable to install rubygems through rvm

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

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

"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."

Any help on this on how to proceed.

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

rvm get stable
rvm rubygems current

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

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

rvm_rubygems_version=1.8.24 rvm install ruby

Or also with specific Ruby version:

rvm_rubygems_version=1.8.24 rvm install ruby 1.9.3

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.

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.

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

\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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM