遇到一个很老的项目,它需要安装的是ruby2.1.5,rails4.2.0
我电脑是mac
安装rails4.2.0的时候,提示ERROR: Error installing rails:
date requires Ruby version >= 2.6.0.
查了一下,date这个gem的所有历史版本,最低需要ruby2.4.0
于是改为安装ruby2.4.10,继续安装rails4.2.0
现在提示:
ERROR: Error installing rails:
There are no versions of net-imap (>= 0) compatible with your Ruby & RubyGems. Maybe try installing an older version of the gem you're looking for?
net-imap requires Ruby version >= 2.6.0. The current ruby version is 2.4.10.364.
查了一下这个net-imap的所有历史版本,最低都要ruby2.5.0才能用。
无语了,再安装ruby2.5.8后,虽然rails4.2.0安装成功了,但根本无法启动项目
启动时出现大批警告:
warning: constant ::Fixnum is deprecated
warning: constant ::Bignum is deprecated
并且报错/.rvm/gems/ruby-2.5.8@rails420/gems/activesupport-4.2.0/lib/active_support/core_ext/numeric/conversions.rb:131:in `block (2 levels) in <class:Numeric>': stack level too deep (SystemStackError)
求解决办法,怎么才能让这个老项目跑起来????