views:

195

answers:

2

Same as Title said: What is the benefit for freeze gems in Ruby on Rails?

+2  A: 

When you freeze a gem it copies it in to the /vendor directory in your application and the application will load it before it loads a version of the gem installed in the normal rubygems path.

The advantage is that it means when you put your application source code on another machine you have the gem already available to the application without having to install it separately on the machine and you also know that the version of the gem you rely on is available. One disadvantage of this approach is that you can't really do it for gems which have C components which need to be compiled on installation.

There are now other mechanisms for helping manage the installation of gems that your application depends on such as geminstaller which can be used to semi-automate the installation of the gems your appliation relies on.

paulthenerd