Migrare un forum MyBB a Discourse

Needed to install some extra packages for the bundle install to run without errors in Ubuntu Mate 22.10 after following the Install Discourse for development using Docker guide:

sudo apt install ruby-bundler ruby-dev libpq-dev libmysqlclient-dev

However, there may be still something missing because when I try to run bundle exec rails db:drop it tells me Discourse requires Ruby 3.1 or above.
And ruby -v tells me I’m using ruby 3.0.4p208 (2022-04-12 revision 3fa771dded) [x86_64-linux-gnu].

So I think there’s something wrong with the guides or the scripts.