about processes and engines

gem freeze

2010/02/28 update : don’t bother reading this post, bundler is the way to go

This doesn’t deserve a gem. It’s just a plain file, so it’s packaged as a gist. It’s inspired by Rails’ rake rails:freeze:gems but I made it for my non-rails stuff.

jmettraux@sanma ~/tmp/test $ ruby frigo.rb dm-migrations
 . created dir vendor
 .. from got dm-migrations-0.9.10
 .. from got dm-core-0.9.10
 .. from got data_objects-0.9.11
 .. from got addressable-2.0.2
 .. from got rake-0.8.4
 .. from got rspec-1.2.2
 .. from got cucumber-0.2.2
 .. from got term-ansicolor-1.0.3
 .. from got treetop-1.2.5
 .. from got polyglot-0.2.5
 .. from got hoe-1.11.0
 .. from got rubyforge-1.0.3
 .. from got diff-lcs-1.1.2
 .. from got builder-2.1.2
 .. from got launchy-0.3.3
 .. from got configuration-0.0.5
 .. from got extlib-0.9.10

jmettraux@sanma ~/tmp/test $ ls vendor/
addressable-2.0.2       dm-core-0.9.10          polyglot-0.2.5
builder-2.1.2           dm-migrations-0.9.10    rake-0.8.4
configuration-0.0.5     extlib-0.9.10           rspec-1.2.2
cucumber-0.2.2          frozen.rb               rubyforge-1.0.3
data_objects-0.9.11     hoe-1.11.0              term-ansicolor-1.0.3
diff-lcs-1.1.2          launchy-0.3.3           treetop-1.2.5


OK, it downloaded dm-migrations and all its required gems under vendor/ but what is this vendor/frozen.rb thing ?

# require this file to get all the frozen/unpacked gems into the load path
# ( created via frigo.rb )

here = File.expand_path(File.dirname(__FILE__))

Dir.entries(here).select { |p|
  p.match(/^[^\.]/) and"#{here}/#{p}/lib")
}.each { |p|

“require ‘vendor/frozen.rb'” will add to the loadpath all the lib/ paths under the vendor/ dir. This frozen.rb file is added by the frigo.rb freezer.

frigo.rb is [awaiting obsolescence] at


Written by John Mettraux

March 30, 2009 at 8:18 am

Posted in ruby

%d bloggers like this: