frozen_gems_generator

Description

The frozen_gems generator gives your Rails application its own private gem library, in vendor/gems, and a script/gem command for managing that library.

To enable, run

script/generate frozen_gems

Scripts and tasks that load environment.rb will have access to the application's gem library. Gems in the system-wide gem library are still accessible to your app, but gems in the private library will be found first. (One consequence of this is that 'script/gem list' will show all of the gems installed in both libraries.)

Install

sudo gem install frozen_gems_generator
script/generate frozen_gems

Synopsis

To manage your app's gems, use the script/gem command (which is just a wrapper for the standard gem command and uses the same syntax). For example:

$ script/gem install xml-simple
Executing 'gem install' with --no-rdoc and --no-ri options
    Bulk updating Gem source index for: http://gems.rubyforge.org
    Successfully installed xml-simple-1.0.11

Gems are installed without RDoc and ri documentation; other than that, the behavior should be the same as the standard gem command. (Due to a bug in some versions of RubyGems, the first attempted installation may fail; subsequent attempts should succeed.)

Issues

Gems that have binary components install the binary components in the system-wide Ruby lib directories. Thus, when such gems are frozen and deployed, they will be incomplete. I recommend that you install such gems in the system-wide gem library on development machines and the deployment machine alike. Suggestions for a satisfactory solution to this problem are welcome.

Requirements

FrozenGems assumes Rails 2.0 or greater, due to its dependency on preinitializer.rb. If you're using an earlier version of Rails, you can copy the contents of config/preinitializer.rb into config/environment.rb, just prior to the call to Rails::Initializer.run.

Bugs/Requests

Please submit your bug reports, patches or feature requests as a ticket under the component "frozen_gems_generator". You'll have to create an account (Sorry! Otherwise we'd get way too much spam).

License and Copyright

Copyright (c) 2008 Glenn Vanderburg, released under the MIT license