Here, Piston is a great
help again, as you can update across your project and only pull changes from
upstream when you are ready. You have two options for structuring the source
tree: you can either pull the plugins directory as a whole (into vendor/plugins), or
you can cherry-pick the plugins you need for each application.
RubyGems
Maintaining gem dependencies between development environments, staging,
and production servers can be a hassle. The most consistent solution is to ???vendor
everything?????”create a vendor/gems directory, carry your gem dependencies
around with the project code, and modify Rails to look there before your
installed RubyGems.
Chris Wanstrath came up with this solution (http://errtheblog.com/post/2120),
and Dr. Nic Williams packaged it into a gem itself, gemsonrails (http://
gemsonrails.rubyforge.org/). Kyle Maxwell has a Rails plugin that allows the
???vendor everything??? approach to be used for gems that require building native
extensions (http://svn.kylemaxwell.com/rails_plugins/vendor_everything_extensions/).
Rails Deployment | 315
Ruby and Rails extensions
Any project of reasonable size usually accumulates a series of extensions, annotations,
and utility functions that supplement the Ruby and Rails core. Examples
of Ruby extensions:
class String
# "Frequently - Asked Questions!" => "frequently_asked_questions_"
def to_slug
self.
Pages:
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479