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

  • Home
  • SEARCH
  • 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 3598148
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T20:12:23+00:00 2026-05-18T20:12:23+00:00

Scenario: I am developing a gem gem-foo , using Bundler. I have a dependency

  • 0

Scenario: I am developing a gem gem-foo, using Bundler. I have a dependency on gem-bar, which I have checked out locally for development. I can declare this dependency in the Gemfile as:

gem "gem-bar", :path => "/path/to/local/gem-bar"

However, when developing a gem the “best practice” seems to be to define the required gems in the gem-foo.gemspec via:

s.add_runtime_dependency 'gem-bar'

and then simply include the dependencies in the Gemfile using:

gemspec

What I would like to do is to add the runtime dependency on the gem in the gemspec, but make some local modifications to gem-bar and have a bundle install use the local development checkout. Assume the case where I control both gems, and am hacking on them somewhat concurrently, and I’ll be pushing the new versions simultaneously. I could just comment out the s.add_runtime_dependency in the gemspec and add it with the local path in the Gemfile, but that feels… error-prone? The gemspec should always declare this dependency, and the Gemfile should be able to override the location Bundler should use for the gem. However, if you actually do this, you get the following error:

You cannot specify the same gem twice coming from different sources. You specified that gem-bar (>= 0) should come from an unspecfied source and source at /path/to/local/gem-bar

Ideally, I’d just have some sort of local override, since I never want the case where I accidentally push the gem with the requirement of a local gem-bar at a specific path. That would be dumb.

Does anyone have a good solution to this use case?

  • 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-18T20:12:23+00:00Added an answer on May 18, 2026 at 8:12 pm

    A few people have found this problem, Yehuda Katz has said he would happily accept a patch: http://groups.google.com/group/ruby-bundler/browse_thread/thread/d4215c4930a63ffc?pli=1

    As the best workaround, comment out the gemspec line in your gemfile and suffer some duplication?

    Update:

    It looks like you don’t have to wait – https://github.com/carlhuda/bundler/commit/03378109d

    The commit message:
    “Make it possible to override a .gemspec dependency’s source in the Gemfile”

    hooray!

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

Sidebar

Related Questions

Scenario: I am developing a gem gem-foo , using Bundler. I have a dependency
Scenario I have a site where users can register for a course, I'm developing
I am developing a small app using jquery mobile. I have the following scenario
Scenario: Every page on the website will have a menu bar at the top
This is the scenario: I'm developing a dropdown widget in Jquery. I have to
This is the scenario i have: im developing a web app that will list
OK let me explain the scenario. I am developing an app which has a
Hey, can anybody confirm the following scenario will work: I am developing a 3-tier
I am developing a java application. I have scenario to take screen shot of
i have a scenario like this: I am developing an android peer to peer

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.