I have installed the latest release of ruby with "Sudo snap install ruby --classic" and i have confirmed with "which ruby" and "ruby -v" commands that the ruby exists and that the latest version ruby 3.2.2 also exists but whenever i tyried to run my rails app on the server i get this error "Your Ruby version is 3.0.2, but your Gemfile specified 3.2.2"
I think your Ruby version is changing to 3.0.2 when you navigate to your Rails application repository or folder, you can try the following steps to potentially resolve the problem:
OR
Note: delete Gemfile.lock file before giving bundle install