Apr 15, 2008
Generic-user-small Brian Doll 2 posts

Topic: Deploying Rails Applications / Locking down plug-ins and gems

DOH! This is already documented in the errata for the book.

http://books.pragprog.com/titles/fr_deploy/errata

 
Apr 15, 2008
Generic-user-small Brian Doll 2 posts

Topic: Deploying Rails Applications / Locking down plug-ins and gems

As some others have noted, there may likely be some sections of this book that are effected by differences in Rails 2. I just bought the book an hour ago or so, but I just stumbled on what might be the first of such instances and thought I’d bring it up.

In “Locking Down Plug-ins and Gems”, the advice is to pull the contents of a gem’s lib directory out into the vendor directory of a Rails app. In Rails 2 (and prior, for some) I would guess that the correct advice is to commit the gems under /vendor/gems, such that you may have /vendor/gems/foo-1.2.3 and /vendor/gems/bar-1.2.2.

This is made possible by the environment.rb load_paths configuration which iterates over /vendor/gems directories and includes each of their lib directories during startup. Additionally, this makes for a much cleaner /vendor directory, with more clarity around what files belong to what gem.

Looking forward to reading the rest of the book!
cheers,
b

2 posts