# Sessions's in ROR wonky

**URL:** <https://www.ruby-forum.com/t/sessionss-in-ror-wonky/136687>\
**Category:** Rails\
**Created:** [May 5, 2008, 3:36pm UTC](https://www.ruby-forum.com/t/sessionss-in-ror-wonky/136687 "2008-05-05T15:36:15Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Marra](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/f6c823/32.png) [@Marra](https://www.ruby-forum.com/u/Marra)\
**Post date:** [May 5, 2008, 3:36pm UTC](https://www.ruby-forum.com/t/sessionss-in-ror-wonky/136687/1 "2008-05-05T15:36:15Z")

</div>

I’m trying to build the “Rails Space” app using the RailsSpace book  
but I’ve reached the part where you debug your sessions in the layout  
and my sessions info comes out to be really crazy and look nothing  
like what it does in the book.

#\<CGI::Session:0x17d4708  
@session\_id=“1b50601c8baa5557852b400c0daea941”,  
@cgi=#\<Mongrel::CGIWrapper:0x182dd44  
@cookies={"\_rails\_space\_session"=\>[“1b50601c8baa5557852b400c0daea941”]},  
@response=#\<Mongrel::HttpResponse:0x182df38 @body=#\<StringIO:  
0x182ded4\>, @body\_sent=false, @socket=#TCPSocket:0x18304f4,  
@header=#\<Mongrel::HeaderOut:0x182de84 @allowed\_duplicates={“WWW-  
Authenticate”=\>true, “Set-Cookie2”=\>true, “Set-Cookie”=\>true,  
“Warning”=\>true}, @sent={“Date”=\>true}, @out=#StringIO:0x182deac\>,  
@status\_sent=false, @status=404, @header\_sent=false\>,  
@handler=#\<Mongrel::Rails::RailsHandler:0x1771770  
@active\_request\_path="/user", @listener=#\<Mongrel::HttpServer:  
0x11c0948 @classifier={"/"=\>[#\<Mongrel::Rails::RailsHandler:  
0x1771770 …\>]},

(its longer but I cut it off)

I was hoping anyone could help me with this. I’m using Leopard with  
SQL installed. Any help would be appreciated, the application adds  
members easily, and I’ve triple checked whats in the book and in my  
code.

I did uncomment the  
config.action\_controller.session\_store= :active\_record\_store in the  
environment.rb when the book indicated to do so. Another thing you may  
want/need to know is when I raked the db:sessions:create, in the book  
it says it should be add\_sessions but mine came out to be  
create\_sessions.

Thank you for any help! 😃

---

<div class="post-metadata">

**Author:** ![Marra](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/f6c823/32.png) [@Marra](https://www.ruby-forum.com/u/Marra)\
**Post date:** [May 5, 2008, 3:57pm UTC](https://www.ruby-forum.com/t/sessionss-in-ror-wonky/136687/2 "2008-05-05T15:57:09Z")

</div>

> want/need to know is when I raked the db:sessions:create, in the book  
> it says it should be add\_sessions but mine came out to be  
> create\_sessions.
> 
> Thank you for any help! 😃

You not need to worry about it, it’s only matter of rake version.  
create\_session or AddSessions is the same, so for it creates table of  
sessions and add index into session\_id.

Reinhart  
[http://teapoci.blogspot.com](http://teapoci.blogspot.com)

---

<div class="post-metadata">

**Author:** ![Marra](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/f6c823/32.png) [@Marra](https://www.ruby-forum.com/u/Marra)\
**Post date:** [May 5, 2008, 4:00pm UTC](https://www.ruby-forum.com/t/sessionss-in-ror-wonky/136687/3 "2008-05-05T16:00:46Z")

</div>

Thank you! It seems its already indexed. As is updated\_at:

index\_sessions\_on\_session\_id INDEX 0 Edit Drop  
session\_id  
index\_sessions\_on\_updated\_at INDEX 0 Edit Drop updated\_at

Shall I remove the updated\_at index or leave it be? Thank you!

On May 5, 9:57 am, Rails T. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)
