[英]Error installing Ruby with RVM (fails installing RubyGems)
I'm trying to install Ruby 1.9.3 via RVM.我正在尝试通过 RVM 安装 Ruby 1.9.3。 However, when it gets to the point of installing RubyGems, I get this:
但是,当安装 RubyGems 时,我得到了这个:
curl: (22) The requested URL returned error: 404 The requested url does not exist: 'http://production.cf.rubygems.org/rubygems/rubygems-.tgz' Trying ftp:// URL instead.
curl: (22) 请求的 URL 返回错误:404 请求的 url 不存在:'http://production.cf.rubygems.org/rubygems/rubygems-.tgz' 正在尝试 88282366036662857://8681
% Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- 0:05:00 --:--:-- 0curl: (28) connect() timed out!
% Total % Received % Xferd Average Speed Time Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- 0:05:00 --:--:-- 0curl: ( 28) connect() 超时!
There was an error, please check /home/jjw0c4/.rvm/log/ruby-1.9.3-p125/*.log
出现错误,请检查/home/jjw0c4/.rvm/log/ruby-1.9.3-p125/*.log
There has been an error while trying to fetch the source.尝试获取源时出错。 Halting the installation.
停止安装。
My guess is the URL " /rubygems-.tgz
", shouldn't there be a version number on the end?我的猜测是 URL "
/rubygems-.tgz
",最后不应该有版本号吗?
This was a bug in the earlier version of RVM.这是 RVM 早期版本中的一个错误。
Update RVM:更新 RVM:
rvm get stable # OR:
rvm get head # OR if none worked:
curl -L get.rvm.io | bash -s stable
The installer also does update (in fact latest rvm get...
just calls the installer)安装程序也会进行更新(事实上最新的
rvm get...
只是调用安装程序)
I ended up removing and then reinstalling RVM using the command on the RVM site:我最终使用 RVM 站点上的命令删除并重新安装了 RVM:
curl -L get.rvm.io | bash -s stable
Now I have我现在有
rvm 1.12.1 (stable) by Wayne E. Seguin <wayneeseguin@gmail.com>, Michal Papis <mpapis@gmail.com> [https://rvm.io/]
installed.安装。
Thanks.谢谢。
I don't know if this is the same reason you are having a problem or not, but for me, I think the reason I was having this problem was because my cURL CA bundle (the list of valid certificate authorities) was outdated.我不知道这是否与您遇到问题的原因相同,但对我而言,我认为我遇到此问题的原因是因为我的 cURL CA 捆绑包(有效证书颁发机构列表)已过时。 So I think it was failing on validating SSL certificates.
所以我认为它无法验证 SSL 证书。 When I updated my CS bundle it was able to install RubyGems just fine.
当我更新我的 CS 包时,它能够很好地安装 RubyGems。
Update: I also found out that some RubyGems.org servers were down when I was in the process of installing RubyGems so that is why it was resulting in 404 errors.更新:我还发现一些 RubyGems.org 服务器在我安装 RubyGems 的过程中出现故障,这就是导致 404 错误的原因。 I tried again today, and it worked.
我今天又试了一次,成功了。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.