N.B.
- I'm not trying to do this from the command line.
- None of these answers include all the gems, so nothing based on these solutions will work
- I'm using Bundler (and Rails, but that should not matter).
I'm only interested in getting a particular (locally installed) gem, but if you have a solution that lists all gems installed in the current app's bundle (which the aforementioned link fails to show how to do, despite one answer purporting to do so) I can deal with filtering out the ones I don't care about.
So, from within Ruby code, how can I check the version of a gem available to the current app?