In the terminal, specify (the directory you want to add) with "cd ~". Open the gemfile (directory you want to add) in VSCode, change the version after "mysql2" of "gem'mysql2', '0.?.?'" To "'0.5.3'", Set it to "gem'mysql2', '0.5.3'".
Write "gem'pry-rails'" at the bottom of the gemfile and return to the terminal. In the terminal, bundle update will install the gem.
If the version of mysql2 has already been changed, it will be installed by doing "bundle install" after writing pry-rails.
I would appreciate it if you could point out any mistakes.