Description:

The 'rails plugin new' command creates a skeleton for developing any
kind of Rails extension with ability to run tests using dummy Rails
application.

Example:

rails plugin new ~/Code/Ruby/blog

This generates a skeletal Rails plugin in ~/Code/Ruby/blog.
See the README in the newly created plugin to get going.