rvm ruby 无法找到后备URL

问题描述 投票:1回答:2

当我尝试使用rvm更新ruby版本时:rvm install ruby-2.4.0

我有这个错误

Searching for binary rubies, this might take some time.
No binary rubies available for: ubuntu/12.04/i386/ruby-2.4.0.
Continuing with compilation. Please read 'rvm help mount' to get more information on binary rubies.
Checking requirements for ubuntu.
Requirements installation successful.
Installing Ruby from source to: /usr/local/rvm/rubies/ruby-2.4.0, this may take a while depending on your cpu(s)...
ruby-2.4.0 - #downloading ruby-2.4.0, this may take a while depending on your connection...
% Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                             Dload  Upload   Total   Spent    Left  Speed
0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
curl: (22) The requested URL returned error: 404
The requested url does not exist(22): 'https://cache.ruby-lang.org/pub/ruby/2.4/ruby-2.4.0.tar.bz2'
Checking fallback: https://ftp.ruby-lang.org/pub/ruby/2.4/ruby-2.4.0.tar.bz2
No fallback URL could be found, try increasing timeout with:

echo "export rvm_max_time_flag=20" >> ~/.rvmrc

There has been an error fetching the ruby interpreter. Halting the installation.

有人知道如何解决它吗?因为这引起了Rails 5的一些麻烦,我得到了这样的信息:/config/initializers/new_framework_defaults.rb:15:in '<top (required)>: undefined_method 'to_time_preserves_timezone='

这是我的new_framework_defaults.rb

# Make Ruby 2.4 preserve the timezone of the receiver when calling `to_time`.                                                                                       
# Previous versions had false. 
ActiveSupport.to_time_preserves_timezone = true
ruby-on-rails ruby rvm
2个回答
1
投票

目前,只有预览可用。运行此命令:

rvm install 2.4.0-preview1

0
投票

第一:

echo "export rvm_max_time_flag=20" >> ~/.rvmrc

后:

rvm install 2.4.0

例:

[root@localhost ~]# rvm install 2.4.0
Searching for binary rubies, this might take some time.
No binary rubies available for: centos/6/x86_64/ruby-2.4.0.
Continuing with compilation. Please read 'rvm help mount' to get more information on binary rubies.
Checking requirements for centos.
Installing requirements for centos.
Installing required packages: patch, autoconf, automake, bison, gcc-c++, libffi-devel, libtool, patch, readline-devel, sqlite-devel, zlib-devel, glibc-headers, glibc-devel, libyaml-devel, openssl-devel.................................
Requirements installation successful.
Installing Ruby from source to: /usr/local/rvm/rubies/ruby-2.4.0, this may take a while depending on your cpu(s)...
ruby-2.4.0 - #downloading ruby-2.4.0, this may take a while depending on your connection...

curl: (35) SSL connect error
There was an error(35).
Checking fallback: https://ftp.ruby-lang.org/pub/ruby/2.4/ruby-2.4.0.tar.bz2
No fallback URL could be found, try increasing timeout with:

    echo "export rvm_max_time_flag=20" >> ~/.rvmrc

There has been an error fetching the ruby interpreter. Halting the installation.
[root@localhost ~]# echo "export rvm_max_time_flag=20" >> ~/.rvmrc
[root@localhost ~]# rvm install 2.4.0
Searching for binary rubies, this might take some time.
Found remote file https://rvm_io.global.ssl.fastly.net/binaries/centos/6/x86_64/ruby-2.4.0.tar.bz2
Checking requirements for centos.
Requirements installation successful.
ruby-2.4.0 - #configure
ruby-2.4.0 - #download
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 20.1M  100 20.1M    0     0  4370k      0  0:00:04  0:00:04 --:--:-- 5839k
ruby-2.4.0 - #validate archive
ruby-2.4.0 - #extract
ruby-2.4.0 - #validate binary
ruby-2.4.0 - #setup
ruby-2.4.0 - #gemset created /usr/local/rvm/gems/ruby-2.4.0@global
ruby-2.4.0 - #importing gemset /usr/local/rvm/gemsets/global.gems...................................
ruby-2.4.0 - #generating global wrappers........
ruby-2.4.0 - #gemset created /usr/local/rvm/gems/ruby-2.4.0
ruby-2.4.0 - #importing gemsetfile /usr/local/rvm/gemsets/default.gems evaluated to empty gem list
ruby-2.4.0 - #generating default wrappers........
[root@localhost ~]# rvm list

rvm rubies

=* ruby-2.4.0 [ x86_64 ]

# => - current
# =* - current && default
#  * - default
© www.soinside.com 2019 - 2024. All rights reserved.