Why does racc require a Ruby version >= 2.5?

Viewed 588

I have setup a docker image with Ruby 2.3.4, and have the following error...

> [6/9] RUN gem install rails -v 4.2.11.1:                                                                                          
#9 11.36 ERROR:  Error installing rails:
#9 11.36        racc requires Ruby version >= 2.5.
#9 11.38 Successfully installed thread_safe-0.3.6
#9 11.38 Successfully installed tzinfo-1.2.9
#9 11.38 Successfully installed concurrent-ruby-1.1.10
#9 11.38 Successfully installed i18n-0.9.5
#9 11.38 Successfully installed activesupport-4.2.11.1
#9 11.38 Successfully installed rails-deprecated_sanitizer-1.0.4

This same configuration works happily outside of docker, what have I missed?

1 Answers

You try to install gem rails v.4.2.11

It uses racc 1.6.0

enter image description here

This racc version needs ruby >= 2.5

Usually we install gems with bundler from Gemfile and Gemfile.lock. And install specific rails version only if need to create new app with it. I don't think you want to create new app with old Ruby and old Rails

So if you have project with such rails version, I think it's better to run bundle install. If you have working project with locked gems versions, they will be installed successfully

Related