you need the ruby-debugger gem. Make sure you have have rubygems installed, then do
gem install ruby-debug
Then, add the line
require 'ruby-debug'
to your sourcecode to load the library, and add the keyword 'debugger' wherever you want to set a breakpoint. Now, whenever you call the code in question, it'll drop to the debugging console when it reaches the breakpoint - press h to see a list of options to see what you can do from there. Obviously, remember to remove your breakpoints and the require statement after you're done!