# How to package a plugin and publish it

**URL:** <https://www.ruby-forum.com/t/how-to-package-a-plugin-and-publish-it/138437>\
**Category:** Rails\
**Created:** [May 23, 2008, 1:24am UTC](https://www.ruby-forum.com/t/how-to-package-a-plugin-and-publish-it/138437 "2008-05-23T01:24:08Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![pbn](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/f4b2a3/32.png) [@pbn](https://www.ruby-forum.com/u/pbn)\
**Post date:** [May 23, 2008, 1:24am UTC](https://www.ruby-forum.com/t/how-to-package-a-plugin-and-publish-it/138437/1 "2008-05-23T01:24:08Z")

</div>

Hi,

I searched this forum as well as googled for documentation on how to  
package a plugin, couldn’t find any.  
May be I missed documentation about it, I really appreciate for any  
pointers to doc/tutorial or steps for packaging and publishing a rails  
plugin.

Thanks  
Babu

---

<div class="post-metadata">

**Author:** ![pbn](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/f4b2a3/32.png) [@pbn](https://www.ruby-forum.com/u/pbn)\
**Post date:** [May 23, 2008, 1:39am UTC](https://www.ruby-forum.com/t/how-to-package-a-plugin-and-publish-it/138437/2 "2008-05-23T01:39:42Z")

</div>

pbn wrote:

> Hi,
> 
> I searched this forum as well as googled for documentation on how to  
> package a plugin, couldn’t find any.  
> May be I missed documentation about it, I really appreciate for any  
> pointers to doc/tutorial or steps for packaging and publishing a rails  
> plugin.
> 
> Thanks  
> Babu

rails plugin\_test\_app  
cd plugin\_test\_app  
ruby script/generate plugin make\_rails\_scale

Open up vendor/plugins/make\_rails\_scale/lib and stick some ruby classes  
in it. then edit the plugins init.rb to require them and other  
initialization stuff. Check out the structure of another plugin which  
does something sort of similar, architecturally and see how they do it.

---

<div class="post-metadata">

**Author:** ![pbn](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/f4b2a3/32.png) [@pbn](https://www.ruby-forum.com/u/pbn)\
**Post date:** [May 23, 2008, 6:14am UTC](https://www.ruby-forum.com/t/how-to-package-a-plugin-and-publish-it/138437/3 "2008-05-23T06:14:25Z")

</div>

Thanks for the reply… I know how to create a plugin, my question is  
how to package and distribute  
it for sharing it with others.

On May 22, 5:39 pm, Alex W. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

---

<div class="post-metadata">

**Author:** ![pbn](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/f4b2a3/32.png) [@pbn](https://www.ruby-forum.com/u/pbn)\
**Post date:** [May 23, 2008, 7:08am UTC](https://www.ruby-forum.com/t/how-to-package-a-plugin-and-publish-it/138437/4 "2008-05-23T07:08:13Z")

</div>

pbn wrote:

> Thanks for the reply… I know how to create a plugin, my question is  
> how to package and distribute  
> it for sharing it with others.
> 
> On May 22, 5:39 pm, Alex W. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

Right, my bad.

It’s as simple as putting your plugin at a publicly accessible source  
repository. You can use SVN, or host it free at GitHub. Just know that  
only Rails 2.1 supports installing plugins with git via the  
script/plugin method.

Here’s an example of a plugin of mine on GitHub:  
[GitHub - AlexJWayne/fleximage: Rails plugin for uploading images as resources, with support for resizing, text stamping, and other special effects.](http://github.com/Squeegy/fleximage/tree/master)
