# New Site and Rails 2.0 Question

**URL:** <https://www.ruby-forum.com/t/new-site-and-rails-2-0-question/88775>\
**Category:** Rails\
**Created:** [March 14, 2007, 9:19am UTC](https://www.ruby-forum.com/t/new-site-and-rails-2-0-question/88775 "2007-03-14T09:19:28Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![sombrero](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/94ad74/32.png) [@sombrero](https://www.ruby-forum.com/u/sombrero)\
**Post date:** [March 14, 2007, 9:19am UTC](https://www.ruby-forum.com/t/new-site-and-rails-2-0-question/88775/1 "2007-03-14T09:19:28Z")

</div>

Hi guys,

We just built a new site on Ruby R. 1.1.2 (we tried Rails 1.2 but we  
couldn’t seem to get to use the session-anyone has any experience with  
this)?

Would love to hear what you guys think. The site is called  
[www.justanger.com](http://www.justanger.com)

thanks,

Bing

---

<div class="post-metadata">

**Author:** ![sombrero](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/94ad74/32.png) [@sombrero](https://www.ruby-forum.com/u/sombrero)\
**Post date:** [March 14, 2007, 11:23am UTC](https://www.ruby-forum.com/t/new-site-and-rails-2-0-question/88775/2 "2007-03-14T11:23:31Z")

</div>

Bing T. wrote:

> Hi guys,
> 
> We just built a new site on Ruby R. 1.1.2 (we tried Rails 1.2 but we  
> couldn’t seem to get to use the session-anyone has any experience with  
> this)?
> 
> Would love to hear what you guys think. The site is called  
> [www.justanger.com](http://www.justanger.com)
> 
> thanks,
> 
> Bing

What do you mean you couldn’t use session ?

---

<div class="post-metadata">

**Author:** ![sombrero](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/94ad74/32.png) [@sombrero](https://www.ruby-forum.com/u/sombrero)\
**Post date:** [March 14, 2007, 11:29am UTC](https://www.ruby-forum.com/t/new-site-and-rails-2-0-question/88775/3 "2007-03-14T11:29:17Z")

</div>

Jamal S. wrote:

> Bing T. wrote:
> 
> > Hi guys,
> > 
> > We just built a new site on Ruby R. 1.1.2 (we tried Rails 1.2 but we  
> > couldn’t seem to get to use the session-anyone has any experience with  
> > this)?
> > 
> > Would love to hear what you guys think. The site is called  
> > [www.justanger.com](http://www.justanger.com)
> > 
> > thanks,
> > 
> > Bing
> 
> What do you mean you couldn’t use session ?

Using the old version of rails, we use this line:

session[:user] which works just fine.

But in the new rails version, when we use this code the session is  
always returned with the nil value…

---

<div class="post-metadata">

**Author:** ![sombrero](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/94ad74/32.png) [@sombrero](https://www.ruby-forum.com/u/sombrero)\
**Post date:** [March 14, 2007, 11:33am UTC](https://www.ruby-forum.com/t/new-site-and-rails-2-0-question/88775/4 "2007-03-14T11:33:54Z")

</div>

Bing T. wrote:

> Jamal S. wrote:
> 
> > Bing T. wrote:
> > 
> > > Hi guys,
> > > 
> > > We just built a new site on Ruby R. 1.1.2 (we tried Rails 1.2 but we  
> > > couldn’t seem to get to use the session-anyone has any experience with  
> > > this)?
> > > 
> > > Would love to hear what you guys think. The site is called  
> > > [www.justanger.com](http://www.justanger.com)
> > > 
> > > thanks,
> > > 
> > > Bing
> > 
> > What do you mean you couldn’t use session ?
> 
> Using the old version of rails, we use this line:
> 
> session[:user] which works just fine.
> 
> But in the new rails version, when we use this code the session is  
> always returned with the nil value…

I’m using Rails 1.2 and its working fine, try something like this

session[:user] = ‘testing’

then call it from another method

@user = session[:user]

and put this in the view

\<%=@user%\>

PS: why your topic Rails 2.0 ? its not out yet?
