If you would like to try Ruby on Rails 7 with Ruby 3 on Linuxmint 20.03, I am quickly going to demonstrate how to install Ruby, Node, NPM, Yarn, git, build essentials, Ruby on Rails 7 and all other required packages and also will create the demo Rails app and run the Rails server and pull up the rails app in my preferred web browser. There a screencast video of the process that you can find at bottom of the page.
sudo apt install curl
curl -sL https://deb.nodesource.com/setup_lts.x | sudo -E bash -
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
sudo apt-get update
sudo apt-get install git-core zlib1g-dev build-essential libssl-dev libreadline-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev libcurl4-openssl-dev software-properties-common libffi-dev nodejs yarn -y
cd
git clone https://github.com/rbenv/rbenv.git ~/.rbenv
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrcexeexec $SHELLc $SHELL
echo 'eval "$(rbenv init -)"' >> ~/.bashrc
exec $SHELL
git clone https://github.com/rbenv/ruby-build.git ~/.rbenv/plugins/ruby-build
echo 'export PATH="$HOME/.rbenv/plugins/ruby-build/bin:$PATH"' >> ~/.bashrc
exec $SHELL
rbenv install 3.1.2
rbenv global 3.1.2
ruby -v
gem install bundler --no-document
gem install rails -v 7.0.2.4 --no-document
rbenv rehash
rails -v
cd Desktop
rails new demo_app
cd demo_app
rails server
http://localhost:3000