# Create a Plugin or a Gem? e.g. - will\_paginate

**URL:** <https://www.ruby-forum.com/t/create-a-plugin-or-a-gem-e-g-will-paginate/135249>\
**Category:** Rails\
**Created:** [April 19, 2008, 9:01pm UTC](https://www.ruby-forum.com/t/create-a-plugin-or-a-gem-e-g-will-paginate/135249 "2008-04-19T21:01:06Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jh100000](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/b2d939/32.png) [@jh100000](https://www.ruby-forum.com/u/jh100000)\
**Post date:** [April 19, 2008, 9:01pm UTC](https://www.ruby-forum.com/t/create-a-plugin-or-a-gem-e-g-will-paginate/135249/1 "2008-04-19T21:01:06Z")

</div>

I noticed that will\_paginate is now being distributed as a plugin. In  
the readme, it states:

"You should switch to using the gem:

gem install will\_paginate

After that, you can remove the plugin from your application and add  
a simple require to the end of config/environment.rb:

require ‘will\_paginate’"

I am want to reuse code and am trying to understand the advantages of  
using a gem vs a plugin. I thought the “rails way” is to use plugins  
but now that I see will\_paginate is using a gem, I am trying to  
understand what advantages gem distributions have for use in rails  
projects?

Thank you,

John

---

<div class="post-metadata">

**Author:** ![jh100000](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/b2d939/32.png) [@jh100000](https://www.ruby-forum.com/u/jh100000)\
**Post date:** [April 20, 2008, 1:51pm UTC](https://www.ruby-forum.com/t/create-a-plugin-or-a-gem-e-g-will-paginate/135249/2 "2008-04-20T13:51:38Z")

</div>

Same question here. I think plugin is better because it’s ‘freezed’ in  
your code base so easier to deploy to production environment. What’s  
the advantage of using gem?

Thanks  
Jan

- John H. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) [2008-04-19 21:01:06  
+0200]:

---

<div class="post-metadata">

**Author:** ![jh100000](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/b2d939/32.png) [@jh100000](https://www.ruby-forum.com/u/jh100000)\
**Post date:** [April 21, 2008, 6:12am UTC](https://www.ruby-forum.com/t/create-a-plugin-or-a-gem-e-g-will-paginate/135249/3 "2008-04-21T06:12:55Z")

</div>

[http://gemsonrails.rubyforge.org](http://gemsonrails.rubyforge.org) - Great for freezing gems to vendor  
for ease of deployment to production.
