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 7612653
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T01:58:06+00:00 2026-05-31T01:58:06+00:00

To help understand the source code of various gems I often want to place

  • 0

To help understand the source code of various gems I often want to place various puts statements in the source code or even try using the ruby debugger.

But whats the best way of doing this?

Do you clone the project from github and make changes locally, if so how do you “force” the use of the local cloned code over the local gem on your machine. Do I just create some scripts that explicitly require the path of the cloned repos folder?

Or do should I use rvm to create a temp gemset, download the gem and modify it directly?

Are there any other methods ive overlooked? How would this change for gems designed for use within rails projects.

  • 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-31T01:58:08+00:00Added an answer on May 31, 2026 at 1:58 am

    The way I usually do it when I want to make changes to a Gem:

    1. Fork the repository on Github
    2. Check it out and create a new branch for local changes
    3. Use Bundler to manage dependencies for the project which uses the Gem
    4. Change one line in the Gemfile to make it use the forked version of the Gem:

    gem "thegem", :git => "git://github.com/name/thegem.git", :branch => 'mybranch'
    

    or

    gem "thegem", :git => "file:///path/to/thegem", :branch => 'mybranch'
    

    with /path/to/thegem being the path to your local working copy.

    The advantage is that you now already have a the perfect infrastructure set up for contributing your changes through a pull request 🙂

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

Sidebar

Related Questions

(Specifically, I'm using Backbone Model events) Can someone help me understand how javascript events
the following code is not behaving like I would expect. Please help me understand
I want to implement drag&drop possibilities in my application. Here is my source code:
I am trying to understand the OpenSudoku source code. I understand how the Board
I've been looking to the OpenCV's magnificent source code to understand the score calculation.
I want to modify the source code of Nginx (http://nginx.org/download/nginx-0.7.67.tar.gz) so when it serves
I need your help. Here is the source code of my program. I need
Recently, I meet something in other's source code. I don't quite understand the template
When reading source code of Django, I find some statements: class Field(object): Base class
Please help me understand why add1() and add4() report errors and why add2() and

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.