Forum: Ruby on Rails Problem with set-cookie?

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
0e358ce1935b4d5bfeafad24c6138727?d=identicon&s=25 Joa Corb (joya)
on 2009-06-08 10:34
Hello everyone,

I'm a beginner in Ruby on Rails and I have a little problem when I
update my application RoR in my server. Can you help me please?

My problem is:

When I code my application in my computer: It's ok.
When I update my application in my server I have a "bug" with cookies.

When a user come in my website for the first time, I initialize some
cookies. But in my server I have a message in my page and the cookies
isn't initialize:

Set-Cookie: boite=1-2; path=/ Set-Cookie:
path=/; HttpOnly

It's working perfectly in my computer and I searched the problem in
different place but no result :(

My version of rails is 2.3.2.

A fragment of my code where I initialize the cookies:

In welcome_controller.rb
# 3 # Dans le cas où j'ai ni cookie, et que je suis pas loggué
boite = Box.find( :all,
:conditions => "capsules.admin = '1' && boxes.user_id = '0'",
:order => 'position',
:group => 'capsule_id',
:joins => "inner join capsules on boxes.capsule_id =" )
@box = boite

# Pour créer les starters et les closers
@number = 8 - boite.length

# Initialisation des cookies
cookies[:user] = 'mileva'
cookie_text = ""
j = 0
for box in boite
if(j >= 1)
cookie_text = cookie_text + "-"
cookie_text = cookie_text +
j = j + 1

cookies[:boite] = cookie_text

You can see the error in (Warning, if you don't visit for
the first time, you have to clear your cookies)

Thank you and Have fun

6883e5ef03484d4fcef507d7b4f1d243?d=identicon&s=25 Matt Jones (Guest)
on 2009-06-08 18:41
(Received via mailing list)
Your server is running an old version of Passenger (2.0.6); this is a
known issue with that version and Rails 2.3.2. Upgrading to the latest
Passenger will fix it.

--Matt Jones
0e358ce1935b4d5bfeafad24c6138727?d=identicon&s=25 Joa Corb (joya)
on 2009-06-08 19:17
Thank you Matt, I will try it :)
This topic is locked and can not be replied to.