What kind of installation do you have? It doesn’t look like a standard install.
My understanding is that a standard install can be command-line upgraded, although it might take two attempts. If you get stuck with a wrong version of ruby then you have an unusual setup.