title: Best way to debug third-party gems in ruby
body: <p>Since there may be a lot of <strong>Ghost Methods</strong> inside a ruby gem, I don't think it is a good idea to study  the inner mechanism of a ruby gem  just  by reading its source code statically. Is there a way to attach the source file of a third-part gem to a running ruby process for debugging so that I can set break point and see how things work dynamically ?<br>
  BTW,I've tried to navigate to the source file of a third-part gem in RubyMine by clicking on the context menu "Go To->Implementations" of the 'require' statement or other symbol of  an third-part gem( <code>require 'watir'</code> for example ), without success. Is it normal for an IDE of a dynamic typing language such as Ruby to fail a symbol navigation?</p>