ruby -rdebug UltraDedup.rb 

invokes the debugger that comes with Ruby, not ruby-debug. To invoke ruby-debug run as rdebug.