简体   繁体   中英

Installing Ruby 1.8.7-p374 and Rails 3.2.13 error in rack-cache

How can I installing Rails 3.2.13 in a Ruby 1.8.7?

My hosting server using these versions and I would like to set up a environment in Vagrant using a CentOS 7 box.

I install a Ruby 1.8.7 using a RVM.

When I trying to install the Rails 3.2.13, I received an error message: (rack-cache need ruby >= 2.0.0)

Any idea how can I install Rails 3.2.13 using Ruby 1.8.7 ?

[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 ~]$ 

If you have rvm you may just install the latest ruby and rails. There is no need to use the system wide installed version.

https://rvm.io/gemsets/basics

I just use ruby 2.5.1 and rails 5.2.0.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM