Skip to content

Instantly share code, notes, and snippets.

@NewAlexandria
Created June 7, 2012 20:13
Show Gist options
  • Save NewAlexandria/2891289 to your computer and use it in GitHub Desktop.
Save NewAlexandria/2891289 to your computer and use it in GitHub Desktop.
Marshaling Gemsets for Enterprise Gem Control

Problem Case

The situation arose where our Certifier gem would not bundle install Could not find gem 'rspec-core (= 2.5.1, runtime)' in any of the gem sources listed in your Gemfile.

Our gemserver (non-rubygems) only had

  • rspec-core-2.6.4.gem
  • rspec-core-2.8.0.gem

Analysis: someone had an old gem installed via rubygems, and didn't run bundle update when building the latest certifier. This used to be solved by maintaining the full-history of dependencies on our gemserver.

Solutions

We may re-consider that a best practice. We stopped it under the ideal of moving all people toward a curated latest-and-greatest set.

Vagrant

Private gem installations hamper that, which is a matter of team practices. Meeting the best-practice could happen by creating a doc that defines rvm policy/usage, or by providing vagrant slices (local VMs) for development. Vagrant is nouveau, but the community is using it to improve the sense of best-practice.

Tool Improvement

One of the gemset tools, like rvm or rbenv, could be improved or extended to wrap the gem call with a 'managed gem' component that marshals all gem installs into a named set. Like capistrano, but for gems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment