2016-09-19 10 views
1

當我嘗試通過RVM更新版本的紅寶石:rvm install ruby-2.4.0RVM紅寶石無後備網址可以發現

我有這樣的錯誤

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 

回答

1

目前,只有預覽。運行此命令:

rvm install 2.4.0-preview1 
0

第一:

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

後:

rvm install 2.4.0 

實施例:

[[email protected] ~]# 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. 
[[email protected] ~]# echo "export rvm_max_time_flag=20" >> ~/.rvmrc 
[[email protected] ~]# 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/[email protected] 
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........ 
[[email protected] ~]# rvm list 

rvm rubies 

=* ruby-2.4.0 [ x86_64 ] 

# => - current 
# =* - current && default 
# * - default