# Freezing a Gem (not Rails)

**URL:** <https://www.ruby-forum.com/t/freezing-a-gem-not-rails/141038>\
**Category:** Ruby\
**Created:** [June 21, 2008, 1:19am UTC](https://www.ruby-forum.com/t/freezing-a-gem-not-rails/141038 "2008-06-21T01:19:45Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![snowbird122](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/c68b51/32.png) [@snowbird122](https://www.ruby-forum.com/u/snowbird122)\
**Post date:** [June 21, 2008, 1:19am UTC](https://www.ruby-forum.com/t/freezing-a-gem-not-rails/141038/1 "2008-06-21T01:19:45Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![snowbird122](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/c68b51/32.png) [@snowbird122](https://www.ruby-forum.com/u/snowbird122)\
**Post date:** [June 21, 2008, 1:46am UTC](https://www.ruby-forum.com/t/freezing-a-gem-not-rails/141038/2 "2008-06-21T01:46:57Z")

</div>

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.
