Dev environment setup failed on bundle install

How do you switch global ruby version? I tried asdf global ruby 3.1.2 but still stuck on ruby 2.5.0p0 on Mac m1