Which Ruby gems are loaded?

I’ve just been trying to debug an issue with a Ruby gem monkey patching methods which resulted in a bug.

It turns out that it’s easy to find out which gems loaded at a particular point within your application by simply including the following line:

puts Gem.loaded_specs.keys

This happily outputs the loaded gems, sadly it didn’t help me find the problem but did rule out a possible cause.

Leave a Reply

Your email address will not be published. Required fields are marked *