You can have multiple Rails versions installed at the same time.
To install the rails version you need:
gem install rails --version=5.2.8
How to specify the rails version to use
rails _5.2.8_ new old_school_rails
And inside the project, you will have the correct rails version
cd old_school_rails bundle exec rails --version Rails 220.127.116.11