Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6957299
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T14:58:59+00:00 2026-05-27T14:58:59+00:00

Since there may be a lot of Ghost Methods inside a ruby gem, I

  • 0

Since there may be a lot of Ghost Methods 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 ?
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( require 'watir' for example ), without success. Is it normal for an IDE of a dynamic typing language such as Ruby to fail a symbol navigation?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T14:59:00+00:00Added an answer on May 27, 2026 at 2:59 pm

    I would love to know if there’s a better way to do this, but how I usually do it is:

    1. Add the ruby-debug gem to your Gemfile (or ruby-debug19 if you’re on Ruby 1.9.2)
    2. Find the Gem by doing bundle show gemname. I’m on a Mac so I usually pipe this to pbcopy so it gets copied to my clipboard. bundle show rails | pbcopy
    3. Open the gem directory in your favorite editor. mvim /path/to/gem/directory
    4. Navigate to the file and line where you want to put the breakpoint* and insert debugger above the line in question.
    5. Reload page, run test, or do whatever you would to get the Gem file to execute
    6. When execution stops at debugger, you can inspect variables (p variable_name), and move line by line with the ruby debugger commands.

    *Knowing where to put the breakpoint can take some understanding of the code, but you should start in lib/gemname.rb

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Since there are no C# source codes for Wait, Pulse, PulseAll methods. Does anyone
Since there is no finally in C++ you have to use the RAII design
Since there is a large pool of passionate developers in this community, I would
Since there is apparently no Flash control that can accept bitmap pastes , I
Since there is no concept of sessions in ASP.Net MVC and each request is
Since there is no way to join tables using Google App Engine datastore, I
Since there is no way that you can make the flash object transparent, there
Edit Since there were many downvotes and people who didn't understand what I'm asking
I'm guessing it's not a Perl Compatible Regular Expression, since there's a special kind
I am planning to use Drizzle in my next C# Mono app. Since there

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.