Noel Rappin Writes Here

August 31, 2010: Bundled Mockingjays

Posted on August 31, 2010

Book Status

Editing the RSpec chapter, which I expect to be done today, it’s all done except for a couple of hard questions from the editor which last-night me decided to leave for this-morning me, so that last-night me could finish Mockingjay. Thanks, last-night me!

A Bundler Question

I’m not sure whether this is a feature-request or an I-don’t know what I’m doing request.

I’ve been using Bundler with a Rails 2.3.8 project, and it’s been working just fine for the most part, I like it. There’s one issue. The project also involves active development on a gem (so that business logic classes can be shared among multiple projects), and I’m not sure how to handle the case in Bundler.

The gem is a separate git repo. In development, the gem is specified in Bundler as a path, so that a developer can work on both without having to push the gem back to the central repo. In staging, though, the gem is specified via git based on the staging branch, and in production it’s specified via git based on the master branch.

What I would like to do is specify the same gem as having different sources in different groups, something like

group :production do
 "common\_gem", :git =\> "git\_repo"
group :development do
 "common\_gem", :path =\> "dev path"

But bundler won’t let me do that because all it sees is the duplicate definition.

Has anybody had a similar issue? Right now, we’re resolving this via checkin scripts that ensure that various branches have the right gemfile when deployed. But it’s an awkward solution.


Okay, I did finish it. I’m mostly amazed at how the Hunger Games books somehow became this year’s YA Book That It’s Okay For Grownup’s To Read. (It’s even got a multi-grownup book discussion on Slate). Trying to decide how I feel about the book, and this may not be the place to go on at length. Still, recommended – even with some flaws, the series is energetic and interesting.


comments powered by Disqus

Copyright 2024 Noel Rappin

All opinions and thoughts expressed or shared in this article or post are my own and are independent of and should not be attributed to my current employer, Chime Financial, Inc., or its subsidiaries.