title: Gems are not working with rbenv despite being installed successfully
body: <p>Ruby gems are not working even though they're supposed to be installed. For example, if I run <code>gem install pry</code> it runs successfully, but then if I run pry it says <code>command not found: pry</code>. I ran rbenv-doctor and it gave this output:</p>
  <pre><code>Checking for `rbenv' in PATH: /usr/bin/rbenv
  Checking for rbenv shims in PATH: OK
  Checking `rbenv install' support: ~/.config/.rbenv/plugins/ruby-build/bin/rbenv-install (ruby-build 20211227-5-g4f1e62f)
  Counting installed Ruby versions: 2 versions
  Checking RubyGems settings: OK
  Auditing installed plugins: OK
  </code></pre>
  <p>I believe this happened originally because I tried moving rbenv to the .config directory. (At that point some gems were partially accessible) So then I completely uninstalled rbenv and its ruby versions and reinstalled, but the problem is still there.</p>
  <p>I also ran <code>rbenv rehash</code>, it does nothing.</p>
  <p>Also might help: if I run bundle in a rails directory it says <code>cannot load such file -- ~/.local/share/gem/gems/bundler-2.2.24/exe/bundle</code> -- there is a bundler in ~/.local/share/gem/gems/ but it's a different version.</p>