Is there any command either in debugger
or ruby-debug
to get a list of all gems and/or plugins loaded in memory for a Rails process? I understand only the 'require
' gems are loaded but I would like to quickly see what got loaded during runtime.
One of the best tools in a rails developers arsenal is the rails console, being extremely useful for brainstorming, debugging, and testing. Having it log active record queries directly to the console can improve readability and convenience over looking through the development logs to see what SQL queries have been run.
Plugins provide: A way for developers to share bleeding-edge ideas without hurting the stable code base. A segmented architecture so that units of code can be fixed or updated on their own release schedule. An outlet for the core developers so that they don't have to include every cool new feature under the sun.
You can exit the debugging session at any time and continue your application execution with the continue (or c ) command. Or, to exit both the debugging session and your application, use the quit (or q ) command.
This should get you everything loaded through rubygems:
Gem.loaded_specs.keys
I don't know of a universal way to see which rails plugins are loaded, you can look at the source for Rails::Initializer (pre 3.0) & figure out what your version of rails is doing. Hopefully you know which plugins should be loading & can confirm that from the console when debugging.
With versions:
Gem.loaded_specs.values.map {|x| "#{x.name} #{x.version}"}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With