Install gem as plugin

There are times when we want to install a gem as a plugin (or to be more precise, freezing the gem), so that we dont need to worry about installing the gem on other servers that may host the app.

Or so that we can modify the gem to suit individual applications.
For example, if we want to run multiple database migrations to different databases within one rake task script, then we need to modify the rake gem. Since modifying gem is usually not possible, we need to install rake as a plugin then modify it from there.

Basically, use gemsonrails instructions. If set up correctly, you’ll then have vendor/gems/[somegemname] and vendor/plugins/gemsonrails .

But an easier way to freeze gems is on err.the_blog.

Leave a Comment

Please note: Comment moderation is enabled and may delay your comment. There is no need to resubmit your comment.