# Lib dir vs. plugin

**URL:** <https://www.ruby-forum.com/t/lib-dir-vs-plugin/111446>\
**Category:** Rails\
**Created:** [August 7, 2007, 2:04pm UTC](https://www.ruby-forum.com/t/lib-dir-vs-plugin/111446 "2007-08-07T14:04:47Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![schof](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/8dc957/32.png) [@schof](https://www.ruby-forum.com/u/schof)\
**Post date:** [August 7, 2007, 2:04pm UTC](https://www.ruby-forum.com/t/lib-dir-vs-plugin/111446/1 "2007-08-07T14:04:47Z")

</div>

I’m still learning about the Rails opinion on where stuff belongs.  
Can someone explain to me the difference between code in the lib vs.  
code in a plugin. What scenarios are appropriate for each approach?

Sean

---

<div class="post-metadata">

**Author:** ![schof](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/8dc957/32.png) [@schof](https://www.ruby-forum.com/u/schof)\
**Post date:** [August 7, 2007, 2:37pm UTC](https://www.ruby-forum.com/t/lib-dir-vs-plugin/111446/2 "2007-08-07T14:37:55Z")

</div>

Plugin is _usually_ supposed to be 3rd party generic code.

lib is for your own application specific supportive libraries.

On 8/7/07, schof [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> I’m still learning about the Rails opinion on where stuff belongs.  
> Can someone explain to me the difference between code in the lib vs.  
> code in a plugin. What scenarios are appropriate for each approach?
> 
> Sean
> 
> >

–  
Cheers!

- Pratik  
[http://m.onkey.org](http://m.onkey.org)
