Say you have n-machines that needs to be in sync with their ruby gem versions, we can have one system to update all as per need and then create this Gemfile and distribute the same. Here is a simple chunk of code that would help to convert all the gems install to a gemfile, which can later be used with bundler. def make_gemfile [:each_default,:each_normal].flat_map { |sym| Gem::Specification.to_e