Oh, sorry, the prefix code assumes you are using rbenv. (It explicitly adds the "shims/" directory before the "gem" command.) But the prefix code is used only if you specify the optional ruby_version (which I just added so you probably aren't using that). If you don't specify the ruby version, then it will work fine without rbenv. If you are using the system Ruby, then you wouldn't specify a Ruby version and you will be fine. If you are using "rvm" or some other Ruby versioning system, then this code won't work.

Since I don't use rvm anymore, I'm not sure how to make that work (and I'm not really interested in trying to figure that out and test it).

If you want to keep this method independent of the Ruby versioning system, I could move this code into a new method called `rbenv_gem_installed()`. Then someone else could later add `rvm_gem_installed()` if they wanted without affecting anything else.