# Authlogic -- gem or plugin?

**URL:** <https://www.ruby-forum.com/t/authlogic-gem-or-plugin/177476>\
**Category:** Rails\
**Created:** [October 18, 2009, 6:45pm UTC](https://www.ruby-forum.com/t/authlogic-gem-or-plugin/177476 "2009-10-18T18:45:35Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Hassan\_S](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/34f0e0/32.png) [@Hassan\_S](https://www.ruby-forum.com/u/Hassan_S)\
**Post date:** [October 18, 2009, 6:45pm UTC](https://www.ruby-forum.com/t/authlogic-gem-or-plugin/177476/1 "2009-10-18T18:45:35Z")

</div>

Trying out Authlogic for the first time – somewhere, can’t find it now  
of course 🙂 I saw a recommendation to use the plugin form, but the  
Ryan B. railscast recommends the gem (without explanation).

Comments or recommendations?

## TIA,

Hassan S. ------------------------ removed\_email\_address@domain.invalid  
twitter: @hassan

---

<div class="post-metadata">

**Author:** ![Hassan\_S](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/34f0e0/32.png) [@Hassan\_S](https://www.ruby-forum.com/u/Hassan_S)\
**Post date:** [October 19, 2009, 7:37pm UTC](https://www.ruby-forum.com/t/authlogic-gem-or-plugin/177476/2 "2009-10-19T19:37:07Z")

</div>

> Trying out Authlogic for the first time – somewhere, can’t find it  
> now  
> of course 🙂 I saw a recommendation to use the plugin form, but the  
> Ryan B. railscast recommends the gem (without explanation).

I’m using it as a plugin and it’s working fine for me…

---

<div class="post-metadata">

**Author:** ![Hassan\_S](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/34f0e0/32.png) [@Hassan\_S](https://www.ruby-forum.com/u/Hassan_S)\
**Post date:** [October 19, 2009, 7:49pm UTC](https://www.ruby-forum.com/t/authlogic-gem-or-plugin/177476/3 "2009-10-19T19:49:24Z")

</div>

I’m using the gem without issues…

If you use the GEM you will get a gem version installed so that you  
can stay consistent between environments (dev, test, pre-prod,  
prod… )

Iif you want the latest and greatest you need to use the plugin…

---

<div class="post-metadata">

**Author:** ![Hassan\_S](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/34f0e0/32.png) [@Hassan\_S](https://www.ruby-forum.com/u/Hassan_S)\
**Post date:** [October 19, 2009, 7:53pm UTC](https://www.ruby-forum.com/t/authlogic-gem-or-plugin/177476/4 "2009-10-19T19:53:30Z")

</div>

The argument for the gem is that any improvements in security/bug  
fixes will be automatically included in your application if you  
continue to update your gems. The argument for the plugin is any  
changes in the gem won’t break your code that was already working if  
you don’t update your plugin.

I would use the updating gem in development. And a frozen plugin in  
deployed app.

On Oct 18, 1:43 pm, Hassan S. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

---

<div class="post-metadata">

**Author:** ![Hassan\_S](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/34f0e0/32.png) [@Hassan\_S](https://www.ruby-forum.com/u/Hassan_S)\
**Post date:** [October 19, 2009, 7:54pm UTC](https://www.ruby-forum.com/t/authlogic-gem-or-plugin/177476/5 "2009-10-19T19:54:09Z")

</div>

Hassan S. wrote:

> Trying out Authlogic for the first time – somewhere, can’t find it now  
> of course 🙂 I saw a recommendation to use the plugin form, but the  
> Ryan B. railscast recommends the gem (without explanation).
> 
> Comments or recommendations?

I believe that Ryan tends to prefer using gem dependencies instead of  
plugins when possible. This is also my own preference. I would guess  
that there is no further explanation provided because it seems to depend  
upon personal preference.

I tend to prefer managing shared libraries outside of my application. I  
feel it eases management of shared libraries and makes upgrading my  
applications to use the newer version easier. Plus it also reduces the  
amount of code that lives inside my project (and hence my version  
control system). I don’t really see the necessity to version control  
shared library code.

It is also my understanding that Rails 3 will contain some improvements  
to the way gem dependencies are currently handled.

---

<div class="post-metadata">

**Author:** ![Hassan\_S](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/34f0e0/32.png) [@Hassan\_S](https://www.ruby-forum.com/u/Hassan_S)\
**Post date:** [October 19, 2009, 8:14pm UTC](https://www.ruby-forum.com/t/authlogic-gem-or-plugin/177476/6 "2009-10-19T20:14:34Z")

</div>

I’ve had projects break before when I’ve updated plugins (my own and  
others’). It’s a little more clear what version of a gem you have  
installed versus a plugin, which may or may not be the most recent  
revision.

On Oct 19, 10:54 am, Robert W. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

---

<div class="post-metadata">

**Author:** ![Hassan\_S](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/34f0e0/32.png) [@Hassan\_S](https://www.ruby-forum.com/u/Hassan_S)\
**Post date:** [October 19, 2009, 8:18pm UTC](https://www.ruby-forum.com/t/authlogic-gem-or-plugin/177476/7 "2009-10-19T20:18:05Z")

</div>

On Mon, Oct 19, 2009 at 10:51 AM, Aaron B. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> The argument for the gem is that any improvements in security/bug  
> fixes will be automatically included in your application if you  
> continue to update your gems. The argument for the plugin is any  
> changes in the gem won’t break your code that was already working if  
> you don’t update your plugin.

This isn’t 100% true because I can call-out the version to use within my  
environment.rb file. For example,

config.gem “sqlite3-ruby”, :lib =\> “sqlite3”, :version =\> “1.2.5”

Now, I can ‘gem update’ without causing issues for my application. The  
bundler gem will replace the above in Rails 3. For now, this has worked  
great in development and production.

-Conrad
