This post is sorely out of date. Chris Wanstrath’s vendor everything technique is more useful and is what I do now.
In fact, I’m converting all my Rails plugins to RubyGems and am building all my development around gems instead of Subversion-based plugins.
If you still need this functionality as a rake task, see my topfunky_power_tools plugin for a current implementation of the idea.
If you have any Rails apps on shared hosts, you know that you have to copy your own libraries into the ./lib folder of your app.
I thought that the new “rake freeze_gems” would do that, but it only freezes the Rails-relevant gems (ActiveRecord, ActionMailer, etc.). If you use any other libraries (like Gruff), you’re on your own.
I wanted to have an automated solution for doing this in a way that worked with Subversion and Switchtower. So I whipped up a little Christmas gift for myself (and I’m re-gifting it to you).
Copy gems.rake into ./lib/tasks. This will make it available to rake.
Edit gems.rake to list the names of the other gems you want to synchronize. In the example, I’m using gruff, sparklines, and pdf-writer.
The files will be copied from your local installed gems and will keep any .svn files intact. You can just “svn update” and your updated gems will be ready to deploy with Switchtower!