# Authentication from scratch

**URL:** <https://www.ruby-forum.com/t/authentication-from-scratch/164660>\
**Category:** Rails\
**Created:** [April 3, 2009, 6:37pm UTC](https://www.ruby-forum.com/t/authentication-from-scratch/164660 "2009-04-03T18:37:36Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![sprsquish](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/d9b06d/32.png) [@sprsquish](https://www.ruby-forum.com/u/sprsquish)\
**Post date:** [April 3, 2009, 6:37pm UTC](https://www.ruby-forum.com/t/authentication-from-scratch/164660/1 "2009-04-03T18:37:36Z")

</div>

Could you please recommend tutorials on developing one’s own  
authentication mechanisms, without the use of industrial-strength  
plugins?

Is this tutorial from 2006 obsolete?

[http://www.aidanf.net/rails\_user\_authentication\_tutorial](http://www.aidanf.net/rails_user_authentication_tutorial)

I spent several person-days trying to install and use  
restful\_authentication, but it was mostly a frustrating, labor-intensive  
exercise in futility. [1, 2] I then found this prescient article by  
David Heinemeier H. from 2005:

> **[Why engines and components are not evil but distracting](https://rubyonrails.org/2005/11/11/why-engines-and-components-are-not-evil-but-distracting)**
>
> I’ve been following the enthusiasm for engines, components, and bigger plugins from the sidelines for a while now. It’s a subject of very mixed emotions. On the one hand, I’m really glad to see that people get so excited and start dreaming of bigger...

I don’t share his philosophical issues with pluggable engines, but in  
practice, he seems to have been spot on. Impressive!

[1] The current issues are FixtureClassNotFound errors in the  
out-of-the-box unit tests on Debian; I’ve tried Ruby 1.87 and 1.9.1,  
each with two variations of restful-authentication:

[http://svn.techno-weenie.net/projects/plugins/restful\_authentication/](http://svn.techno-weenie.net/projects/plugins/restful_authentication/)  
[GitHub - technoweenie/restful-authentication: inactive project](http://github.com/technoweenie/restful-authentication/tree/master)

(Why are those different, anyway?) FWIW, after some minor bug-fixing,  
the plugin works fine on Mac OS X.

[2] I’ve also had headaches with git, which has a steep learning curve,  
no matter how vehemently Linus decrees otherwise.

---

<div class="post-metadata">

**Author:** ![sprsquish](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/d9b06d/32.png) [@sprsquish](https://www.ruby-forum.com/u/sprsquish)\
**Post date:** [April 3, 2009, 7:10pm UTC](https://www.ruby-forum.com/t/authentication-from-scratch/164660/2 "2009-04-03T19:10:25Z")

</div>

Just for the record I installed and setup restful\_authentication with no  
problems.

Persevere with git. It seems strange at first if you have been used to  
svn  
but after a while you will wonder how you managed without it.  
Particularly  
if you use it on your own projects.

Colin

2009/4/3 Jeff S. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

---

<div class="post-metadata">

**Author:** ![sprsquish](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/d9b06d/32.png) [@sprsquish](https://www.ruby-forum.com/u/sprsquish)\
**Post date:** [April 3, 2009, 11:35pm UTC](https://www.ruby-forum.com/t/authentication-from-scratch/164660/3 "2009-04-03T23:35:44Z")

</div>

On Apr 3, 9:36 am, Jeff S. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Could you please recommend tutorials on developing one’s own  
> authentication mechanisms, without the use of industrial-strength plugins?

Sure thing:

> **[\#21 Super Simple Authentication - RailsCasts](http://railscasts.com/episodes/21-super-simple-authentication)**
>
> Short Ruby on Rails screencasts containing tips, tricks and tutorials. Great for both novice and experienced web developers.

Cheers,  
Mark T.

---

<div class="post-metadata">

**Author:** ![sprsquish](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/d9b06d/32.png) [@sprsquish](https://www.ruby-forum.com/u/sprsquish)\
**Post date:** [May 10, 2009, 4:26pm UTC](https://www.ruby-forum.com/t/authentication-from-scratch/164660/4 "2009-05-10T16:26:15Z")

</div>

On Apr 3, 12:36 pm, Jeff S. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> I spent several person-days trying to install and use  
> restful\_authentication, but it was mostly a frustrating, labor-intensive  
> exercise in futility

> The current issues areFixtureClassNotFounderrors in the  
> out-of-the-box unit tests

This issue went away when I tried

script/generate authenticated user sessions

rather than

script/generate authenticated users sessions

The plugin itself does not seem to have any problem with the plural  
“users”, but the tests die (error, not failure) with unintuitive  
output.
