Just a quick heads up that, while Ruby 2.7 will continue to work, you should plan to install Ruby 3 in the near future in order to build the docs. (I recommend using rbenv <https://github.com/rbenv/rbenv> to manage multiple Ruby versions.)
Ruby 2 reached EOL in March 2023 <https://www.ruby-lang.org/en/news/2023/03/30/ruby-2-7-8-released/>. We will be unable to upgrade some of our Ruby dependencies to their latest versions until we are using Ruby 3. This is not a problem today but will likely become a problem in the near future. For more details, please refer to this pull request <https://github.com/apache/spark/pull/44667>. Best, Nick