Saturday, March 13, 2010

gem vs plugin

Rails Plugins

Rails plugins are pieces of code that can be added to a Rails application on at the application level, and reside in the vendor/plugins folder of that application. Plugins are simple to install by simply typing:

syntax
script/plugin install plugin_name

from within the root directory or a Rails application. The main feature to plugins is that they install in each application, and are specific to that application.

Ruby Gems
Ruby gems are also pieces of ruby code that can be added to a system running Ruby, just as simply as adding plugins to an application:

syntax
gem install gem_name

However, gems are installed at a system level, which means that rather than being specific to a Rails application, like a plugin is, gems are available to all Rails applications that are running on the same system. In other words, you would install a gem on your web server, where it is available to all Rails applications running on that web server.

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.