Freezing a Gem (not Rails)

Hello-

I’m writing a fairly involved Ruby application. I want to stabilize the
gems that I’m using by freezing them (I also want to simplify deployment
of the app). Freezing gems is a pretty well understood and documented
process for a Rails application, but I haven’t found anything on how to
do this with a Ruby console app.

Here’s the road I started down. I created a root folder for my app
(MyApp) and subfolders for lib, test, and vendor off of that. I then
went to my vendor directory (MyApp/vendor) and did a “gem unpack
right_aws”, which created a right_aws-1.7.1 folder, which I renamed
right_aws. Is this the right way to get started on this? Also, once I
have all of the gems in the vendor directory, how do I make sure they
are the ones that my app is loading? Any input would be much
appreciated.

Regards-
Eric

On Jun 20, 2008, at 16:18 PM, Eric M. wrote:

I’m writing a fairly involved Ruby application. I want to stabilize
the
gems that I’m using by freezing them (I also want to simplify
deployment
of the app). Freezing gems is a pretty well understood and documented
process for a Rails application, but I haven’t found anything on how
to
do this with a Ruby console app.

The easiest way to do this is to use gems itself. It is smart.

Gem::Specification.new ‘my_gem’, MyGem::VERSION do |s|
s.add_dependency ‘other_gem’, ‘= 1.0’
end

Then simply install your ruby application as a gem.