# Choosing a user login/authentication system

**URL:** <https://www.ruby-forum.com/t/choosing-a-user-login-authentication-system/100441>\
**Category:** Rails\
**Created:** [November 29, 2005, 8:32pm UTC](https://www.ruby-forum.com/t/choosing-a-user-login-authentication-system/100441 "2005-11-29T20:32:27Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![datapanix](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/fbc32d/32.png) [@datapanix](https://www.ruby-forum.com/u/datapanix)\
**Post date:** [November 29, 2005, 8:32pm UTC](https://www.ruby-forum.com/t/choosing-a-user-login-authentication-system/100441/1 "2005-11-29T20:32:27Z")

</div>

hi,

i’m at the point in my app where i’m ready to release it into the wild  
(in this  
case my internal work intranet, not on the internet), and the only thing  
holding it up is the implementation of a some sort of  
login/authentication  
system.

i know there are a bunch of login system generators and plugins that are  
available, but I’m not sure which one to use. the setup of the  
application is  
extremely simple; basically a list of products with some detail  
information  
that i (the admin) updates, and the rest of the world only has read-only  
access. no shopping carts, no designer/author/publisher paradigms-- you  
either  
can change the data or you can’t.

for such a simple case, should I even bother with a prefab solution, and  
just  
write one myself? or is that a recipe for disaster (keeping in mind a  
looming  
deadline and limited, but growing, ruby/rails skills)? if a home-grown  
solution is not the answer, which of the available pre-made modules  
would be  
best for this situation?

thanks in advance for any insight.

---

<div class="post-metadata">

**Author:** ![datapanix](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/fbc32d/32.png) [@datapanix](https://www.ruby-forum.com/u/datapanix)\
**Post date:** [November 29, 2005, 9:13pm UTC](https://www.ruby-forum.com/t/choosing-a-user-login-authentication-system/100441/2 "2005-11-29T21:13:05Z")

</div>

If you want to use a prefab one I think Login Engine is the one for you.

[http://rails-engines.rubyforge.org/wiki/wiki.pl?LoginEngine](http://rails-engines.rubyforge.org/wiki/wiki.pl?LoginEngine)

I haven’t used it but it seems like the right one for simple cases. It  
is an  
engine so it is easy to upgrade.

- Peter

---

<div class="post-metadata">

**Author:** ![datapanix](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/fbc32d/32.png) [@datapanix](https://www.ruby-forum.com/u/datapanix)\
**Post date:** [November 29, 2005, 10:50pm UTC](https://www.ruby-forum.com/t/choosing-a-user-login-authentication-system/100441/3 "2005-11-29T22:50:17Z")

</div>

Peter M. \<petermichaux@…\> writes:

> If you want to use a prefab one I think Login Engine is the one for  
> you.[http://rails-engines.rubyforge.org/wiki/wiki.pl?LoginEngine](http://rails-engines.rubyforge.org/wiki/wiki.pl?LoginEngine)  
> I haven’t used it but it seems like the right one for simple cases. It is an  
> engine so it is easy to upgrade.

Peter,

Thanks for the heads up on the LoginEngine, it looks like a good  
starting  
point. Although, I am running into problems getting it up and running.

I’m following the instructions for installing the Engine plugin at  
http://rails-  
[engines.rubyforge.org/rdoc/engines/](http://engines.rubyforge.org/rdoc/engines/) but when i get to:

→ cd vendor/plugins/login-engine  
 → rake rdoc

I get:  
–\>\> rake aborted!  
–\>\> Don’t know how to build task ‘rdoc’

So, skipping that, I move onto the next step,

→ cd vendor/plugins/login-engine  
 → rake db\_schema\_import

I get:  
–\>\> No such file to load – db/schema.rb

however, schema.rb is clearly in the db/ folder. Neither command  
worked, so I  
don’t have a functional LoginEngine. I know you mentioned you don’t  
have any  
experience with this engine… anyone else have any thoughts on what I  
may be  
doing wrong?

I’m on WinXP/Rails 1.0RC3

Thanks

---

<div class="post-metadata">

**Author:** ![datapanix](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/fbc32d/32.png) [@datapanix](https://www.ruby-forum.com/u/datapanix)\
**Post date:** [November 29, 2005, 11:06pm UTC](https://www.ruby-forum.com/t/choosing-a-user-login-authentication-system/100441/4 "2005-11-29T23:06:26Z")

</div>

I suspect the documentation you are refering to is the Engines README,  
which describes only an example engine rather than anything real,  
whereas you might make better progress looking at the actual  
LoginEngine documentation:

[http://rails-engines.rubyforge.org/rdoc/login\_engine/](http://rails-engines.rubyforge.org/rdoc/login_engine/)

I guess I should make this clear: ‘Engines’ are a means for  
distributing code, _exactly_ like plugins (in fact they _are_  
plugins). The LoginEngine is just one possible engine.

To install the LoginEngine, install the Engines plugin and the  
LoginEngine in the same way you would any other plugin, using the  
‘script/plugin’ install command. Then follow the instructions for the  
specific engines you are working with…

- james

---

<div class="post-metadata">

**Author:** ![datapanix](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/fbc32d/32.png) [@datapanix](https://www.ruby-forum.com/u/datapanix)\
**Post date:** [November 29, 2005, 11:50pm UTC](https://www.ruby-forum.com/t/choosing-a-user-login-authentication-system/100441/5 "2005-11-29T23:50:58Z")

</div>

On 11/29/05, James A. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> To install the LoginEngine, install the Engines plugin and the  
> LoginEngine in the same way you would any other plugin, using the  
> ‘script/plugin’ install command. Then follow the instructions for the  
> specific engines you are working with…
> 
> - james

I’m still unclear on the difference between a plugin and an engine.

---

<div class="post-metadata">

**Author:** ![datapanix](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/fbc32d/32.png) [@datapanix](https://www.ruby-forum.com/u/datapanix)\
**Post date:** [November 29, 2005, 10:54pm UTC](https://www.ruby-forum.com/t/choosing-a-user-login-authentication-system/100441/6 "2005-11-29T22:54:20Z")

</div>

2005/11/29, dave davidson [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid):

> I’m on WinXP/Rails 1.0RC3

rdoc through rake does not work on Windows. Your other problem  
though… Are you in the right folder ? You need to cd  
vendor\plugins\login\_engine before you can run those Rake tasks.

Hope that helps !

---

<div class="post-metadata">

**Author:** ![datapanix](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/fbc32d/32.png) [@datapanix](https://www.ruby-forum.com/u/datapanix)\
**Post date:** [November 30, 2005, 12:15am UTC](https://www.ruby-forum.com/t/choosing-a-user-login-authentication-system/100441/7 "2005-11-30T00:15:12Z")

</div>

Okie doke, here goes:

A plugin is an encapsulated bit of logic, probably (but certainly not  
limited to) including modules to enhance ActiveRecord objects, or  
application helpers

An ‘engine’ is a plugin which also can include views, full  
controllers, model objects, schema and migration data - almost  
anything you might want to put in a normal Rails application. You  
can’t include things like views and migrations in normal rails plugins  
and have them ‘just work’

The actual ‘Engines’ plugin is the plugin which enhances your normal  
Rails application such that the extra views/controllers/migrations/etc  
in your plugins get intelligently mixed in to your application - i.e.  
it contains the code that makes things ‘just work’.

The LoginEngine/UserEngine/WikiEngine/WhateverEngine are _examples_ of  
plugins which takes advantage of the features provided by the Engines  
plugin… therefore we (I) call them ‘engines’.

I’m aware of this kind of confusion where one might believe that  
Engines == LoginEngine, and that if you’re using Engines at all then  
you MUST be using the LoginEngine, which is only as true as saying  
that the Generators == SHLG.

‘Engines’ are a way of sharing code. The ‘LoginEngine’ is an example -  
an ‘instance’ if you like OO parlance. If you have a chunk of code in  
the form of controllers/models/views that you find yourself reusing in  
multiple projects, you might consider turning them into an  
‘engine’-style plugin in the same manner you might think about making  
them into a generator (I would argue that engines (and in fact all  
plugins) are much easier to build and maintain than generators,  
though).

So, to recap, you’ve got:

1. normal plugins… then
2. the Engines plugin, which _is_ a normal plugin that uses the  
regular plugin mechanism to enhance Rails so you can then use and  
develop your own
3. ‘Engines’, i.e. the LoginEngine or WikiEngine, which are just like  
plugins except they can provide views, etc, AND they depend on the  
‘Engines plugin’ to blend their ‘advanced’ features into your  
application.

Does that make more sense?

- james

---

<div class="post-metadata">

**Author:** ![datapanix](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/fbc32d/32.png) [@datapanix](https://www.ruby-forum.com/u/datapanix)\
**Post date:** [November 30, 2005, 1:03am UTC](https://www.ruby-forum.com/t/choosing-a-user-login-authentication-system/100441/8 "2005-11-30T01:03:35Z")

</div>

James,

Maybe post this explaination on your engines wiki for future reference?  
It  
is a nice introduction. Perhaps it could be expanded over time with more  
full details and explaination.

Peter

---

<div class="post-metadata">

**Author:** ![datapanix](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/fbc32d/32.png) [@datapanix](https://www.ruby-forum.com/u/datapanix)\
**Post date:** [November 30, 2005, 12:15am UTC](https://www.ruby-forum.com/t/choosing-a-user-login-authentication-system/100441/9 "2005-11-30T00:15:12Z")

</div>

On 11/29/05, James A. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> and have them ‘just work’
> 
> them into a generator (I would argue that engines (and in fact all  
> 3. ‘Engines’, i.e. the LoginEngine or WikiEngine, which are just like  
> plugins except they can provide views, etc, AND they depend on the  
> ‘Engines plugin’ to blend their ‘advanced’ features into your  
> application.
> 
> Does that make more sense?

Yes, thanks!
