Rvm command to get the list of installed gems

Hi, is there a way to display only the names of the gems and their version numbers that I have installed using rvm?

As of now, I have ruby 3.0.1 and 2 other gems - string-cases and logger installed on my system.

When I do “gem list”, I get a long list of gems along with all their dependencies. I don’t want to see the dependencies. I just want to see the names of the gems like this:

logger-1.4.3
string-cases-0.0.4

I can view the list by going into the “/usr/share/rvm/gems/ruby-3.0.1/gems” directory but is there any rvm command for this?

Thanks

This should work like you expect:

gem list is the command to list t he installed gems with their version. If you have a gem of multiple versions, you will see something like this instead:

linux_stat (2.2.3, 2.2.2, 2.2.1, 2.2.0)