I notice now that rvm suggests to Ubuntu users to install rvm using the dedicated Ubuntu package. However the documentation at RailsApp, where I initially found the advice of installing rvm, does not consider this option but instead uses the above curl command, as if it were considered a better choice. I wonder which one of the two options is preferable, and why.
Also in 2015 there was documentation like the above one that suggested to use the curl command with the --rails option instead of the --ruby option. This suggestion was removed in the RailsApp documentation, and the --ruby option has instead taken its place. I could not find much information on these options. What I understand is that they install respectively the last stable rails gem and the last stable ruby. If this is all they do, I suppose they are optional indeed, since Ruby can be installed later, and every Rails application has its own rails version in the Gemfile.