# Acts\_as\_authenticated trouble

**URL:** <https://www.ruby-forum.com/t/acts-as-authenticated-trouble/57585>\
**Category:** Rails\
**Created:** [April 12, 2006, 7:29am UTC](https://www.ruby-forum.com/t/acts-as-authenticated-trouble/57585 "2006-04-12T07:29:54Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![william\_taft](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/49beb7/32.png) [@william\_taft](https://www.ruby-forum.com/u/william_taft)\
**Post date:** [April 12, 2006, 7:29am UTC](https://www.ruby-forum.com/t/acts-as-authenticated-trouble/57585/1 "2006-04-12T07:29:54Z")

</div>

First off, I’d like to address that I’m n00bs.  
I’ve read the README and blogs associated with this plugin, and there  
really isn’t too much documentation. I have the newest version of  
rails,ruby, and acts\_as\_authenticated installed.

#The setup

I set up the acts\_as\_authenticated in the following manner.  
\*created a table called “accounts” in the database. (minus the  
activation\_code and activated\_at fields)

\*used the generator to “script/generate authenticated account account”

\*followed the instructions in the README to include AuthenticatedSystem  
in my application files.

#the problem

The controllers, views, and models all work fine. The user is directed  
to ‘/signup’ on loading, and upon signing up, everything inserts into  
the database correctly, but when I log in, no session is retained.  
In my account\_controller file, I changed

redirect\_to(:action =\> ‘signup’) unless logged\_in? or Account.count \> 0  
to  
redirect\_to(:action =\> ‘signup’) unless logged\_in?

and my application is in limbo.

I haven’t even attempted to get the mailer running yet, and I figure my  
problem is absurdly easy. But I’d like to get it out of the way.

thanks

---

<div class="post-metadata">

**Author:** ![william\_taft](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/49beb7/32.png) [@william\_taft](https://www.ruby-forum.com/u/william_taft)\
**Post date:** [April 12, 2006, 7:51am UTC](https://www.ruby-forum.com/t/acts-as-authenticated-trouble/57585/2 "2006-04-12T07:51:00Z")

</div>

Try to follow the authentication step by step and inspect the varaibles.  
Have you also read the Wiki somewhere on the technoweenie site and the  
wiki  
at [rubyonrails.org](http://rubyonrails.org) ? There is additionl documentation there for special  
cases like two-way encryption and e-mail activation.

---

<div class="post-metadata">

**Author:** ![william\_taft](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/49beb7/32.png) [@william\_taft](https://www.ruby-forum.com/u/william_taft)\
**Post date:** [April 12, 2006, 8:21am UTC](https://www.ruby-forum.com/t/acts-as-authenticated-trouble/57585/3 "2006-04-12T08:21:35Z")

</div>

Yeah, I’ve read both the stickipad, and the wiki, but they were kind of  
short.  
I’ve followed all the steps included, but I will try again.  
thank you for your reply

---

<div class="post-metadata">

**Author:** ![william\_taft](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/49beb7/32.png) [@william\_taft](https://www.ruby-forum.com/u/william_taft)\
**Post date:** [April 12, 2006, 8:43am UTC](https://www.ruby-forum.com/t/acts-as-authenticated-trouble/57585/4 "2006-04-12T08:43:36Z")

</div>

Alright, I’ve re-installed a couple of times, and added flash[:notice]  
fields for troubleshooting from my views.

everything seems to be working okay.  
flash[:notice] is good.
