Ruby Findings

digging for gems

Treating gems as plugins

Posted by Bill Marquette Sun, 23 Sep 2007 01:09:00 GMT

This is specific to rails 1.2 as I believe Edge Rails has this built in.

There’s been some amount of debate on various blogs on whether packaging up gems in your Rails application is a good choice. In my case, I decided that for me, the deployment convenience (a single application on a single server) far outweighs the maintenance aspects.

I found the ‘gems’ plugin over at techno-weenie.net that does exactly what I want with little effort. It’s a standard script/plugin install and installs a rake task (rake gems:freeze) which takes an argument of the gem you want to freeze. From the README

$ rake gems:freeze GEM=tzinfo

installs the tzinfo gem in vendor/tzinfo-x.y.z (where x.y.z is the version of tzinfo that was frozen). If needed, you can freeze a specific gem version with:

$ rake gems:freeze GEM=tzinfo VERSION=0.1.2

Posted in | no comments | Tags | atom

Trackbacks

Use the following link to trackback from your own site:
http://www.rubyfindings.com/trackbacks?article_id=treating-gems-as-plugins&day=22&month=09&year=2007

Comments

Leave a response

Leave a comment


html>