Rails – list gems at runtime

Here’s a quick little debug feature that’s handy when you need to do a quick verification of the gems at runtime. Especially handy if you have limited access to production.

Helper method using bundler to display the list gems



The code is specific to my application but you can get the point. I have the helper method called inside a div on a page only an admin user can see. Alternatively, you could output the list to a log based on a config flag or execute from a rake file.

Any thoughts? Questions? Issues? Please leave a comment.