[Rubygems-developers] Good practices to freeze gems ? (outside rails)

Chad Fowler chad at chadfowler.com
Thu Nov 30 11:05:36 EST 2006

On 11/30/06, Thibaut Barrère <thibaut.barrere at gmail.com> wrote:
> Hi
> I think it's my first post here, so hello! I've been looking for a
> rubygems-users list but could not find it - so I'm not sure it's appropriate
> to post that kind of questions here...
> I'm working with some ruby scripts stored under subversion. Some of those
> scripts requires gems (like the builder gem for instance, or activerecord).
> I'd like to avoid to have to run 'gem install builder' on each developer
> machine, in order to rely solely on what is in subversion.
> For that purpose I've unpacked the required gems in a version-controlled
> folder.
> Is there a preferred way of telling the gems loader to include all the
> unpacked gems available in this folder ? (while keeping the "require
> 'builder'" statement working ?)
> best regards and thanks for rubygems!
> Thibaut Barrère


Now that you've unpacked the gem, using it is no longer a gem-specific
task.  You just need to add  each gem's lib directory (or equivalent)
to Ruby's load path.  What I would do is to loop through the directory
in which you unpacked each gem, and unshift that directory's lib
subdirectory onto the $: object (somewhere before you try to use the


More information about the Rubygems-developers mailing list