Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Gus' Bundler Woes

I'm not sure what the feature is called in 0.9.26, so I'll describe it instead; essentially, I can package (vendor/cache) my gems for use in deployment and if during the deployment (bundle install vendor/bundle) a gem is found in the shared gems repo (managed through RVM gemsets per project) then that gem is used without unpacking it in vendor/bundle. This is useful to me because my ops dude pre-installs gems needing compilation on all of the systems needing it (managed through Puppet for now); these gems are currently unicorn and bson_ext.

You can argue that he just shouldn't do that and I won't argue back, but that's something he likes since he doesn't want to have to recompile unicorn, bson_ext, etc. for each system as deploys are running; we have a few systems to manage and the list is growing; we also have several services working together and not all are ruby, so he just wants simple deploys. I also can't argue too much with that as there are oodles of things he concerns himself with that I don't have/want to.

Now, in 1.0.x I can certainly get away with only using packaged gems using the --deployment flag (or --local), but in this scenario ALL packaged gems are unpacked, including those that are system gem'ed in an RVM gemset, which means they recompile if they need it. Recompile fails for me because we don't have gcc on the production systems; c'est la vie. Using --deployment in 0.9.26 isn't really a need for me I guess; more of a want.

Basically, I could move to 1.0.x for this specific project (aka my day job) if there was some way to just say "please let me use the shared gem if it's actually there". A while back I tried to find out why I couldn't do this and noticed a thread in bundler's mailing/group list saying this was done on purpose because it seemed like it has the highest use-case or maybe it was an obscure need (paraphrasing from memory). This makes sense since my life is currently on the path of obscurity :)

So ... I whined. And then whined again (which you saw this time ;)

I hope any of that makes sense.

Also, thanks for reaching out. I appreciate it.

Cheers, Gus

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.