App Academy

Struggle to install rails version 5.2.3

Hello, I’ve just finished the software engineering foundation section and I’m currently on Ruby section.
I’m trying to install rails version 5.2.3 as instructed, but it’s showing me errors: ERROR: " Error installing rails:
The last version of globalid (>= 0.3.6) to support your Ruby & RubyGems was 0.4.2. Try installing it with gem install globalid -v 0.4.2 and then running the current command again
globalid requires Ruby version >= 2.6.0. The current ruby version is 2.5.0."

What do I need to do now?

Thank you in advance