在机架缓存中安装Ruby 1.8.7-p374和Rails 3.2.13错误

时间:2018-11-16 15:14:04

标签: ruby-on-rails ruby

如何在Ruby 1.8.7中安装Rails 3.2.13?

我的托管服务器使用这些版本,我想使用CentOS 7盒在Vagrant中设置环境。

我使用RVM安装Ruby 1.8.7。

当我尝试安装Rails 3.2.13时,收到一条错误消息:(rack-cache need ruby >= 2.0.0)

任何想法如何使用Ruby 1.8.7安装Rails 3.2.13吗?

[vagrant@ror02 ~]$ ruby -v
ruby 1.8.7 (2013-06-27 patchlevel 374) [x86_64-linux]
[vagrant@ror02 ~]$ gem install rails -v 3.2.13
Fetching: i18n-0.6.1.gem (100%)
Successfully installed i18n-0.6.1
Fetching: multi_json-1.13.1.gem (100%)
Successfully installed multi_json-1.13.1
Fetching: activesupport-3.2.13.gem (100%)
Successfully installed activesupport-3.2.13
Fetching: builder-3.0.4.gem (100%)
Successfully installed builder-3.0.4
Fetching: activemodel-3.2.13.gem (100%)
Successfully installed activemodel-3.2.13
Fetching: rack-1.4.7.gem (100%)
Successfully installed rack-1.4.7
Fetching: rack-cache-1.8.0.gem (100%)
ERROR:  Error installing rails:
rack-cache requires Ruby version >= 2.0.0.
[vagrant@ror02 ~]$ 

1 个答案:

答案 0 :(得分:1)

如果您有rvm,则可以仅安装最新的红宝石和导轨。无需使用系统范围的安装版本。

https://rvm.io/gemsets/basics

我只使用ruby 2.5.1和rails 5.2.0。