This project is archived and is in readonly mode.

#5828 ✓stale
inetufo

Cookies cann't be saved in rails3?

Reported by inetufo | October 17th, 2010 @ 11:27 AM

I put this code in my controller's action

cookies[:name] = {
    :value   => "test" ,
     :expires => 2.hours.from_now
    }

and i found out that the cookies cann't be saved. My browser is IE8 on win7, rails version is 3.0.1。
I test this with rails 2.3.9, and cookies can be saved.
By the way, i found out that in rails 2.3.9 if without passing the :expires key, the cookies cann't be saved yet.
Is there any information about how to set cookies? I googled for a couples of hours, and have no idea now.
Thanks for your help

Comments and changes to this ticket

  • inetufo

    inetufo October 17th, 2010 @ 03:55 PM

    I have tested this issue under several environments
    1. Windows7 rails3 IE8, cookies can be saved: No
    2. Windows7 rails 2.3.9, cookies can be saved: Yes

    3.WindowsXP rails3 IE6, cookies can be saved: No
    4.WindowsXP rails 2.3.9, cookies can be saved: Yes

    5.Ubuntu 10.04 rails3 Firefox on Ubuntu && IE8 on Windows7, cookies can be saved: Yes
    6.Ubuntu 10.04 rails2.3.9 Firefox on Ubuntu && IE8 on Windows7, cookies can be saved: Yes

    After several testings, i can make a conclusion now.
    When rails3 app is deployed on *nix system the cookies can be saved with IE or Firefox
    When rails3 app is deployed on Windows the cookies cann't be saved with IE or Firefox

    It seems rails3 app deployed on Windows doesn't send cookies to the browsers client
    in the mean while rails 2.3.9 app deployed on Windwos does.
    I think it's a bug of rails3 on Windows.
    This issue has bothered me for a whole day, and really made me a headache...

  • inetufo

    inetufo October 17th, 2010 @ 04:09 PM

    all above the ruby version is ruby 1.8.7, use gem updating everything to the lasted version

  • Ryan Bigg

    Ryan Bigg October 19th, 2010 @ 08:22 AM

    • Importance changed from “” to “Low”

    Automatic cleanup of spam.

  • Santiago Pastorino

    Santiago Pastorino February 2nd, 2011 @ 04:29 PM

    • State changed from “new” to “open”

    This issue has been automatically marked as stale because it has not been commented on for at least three months.

    The resources of the Rails core team are limited, and so we are asking for your help. If you can still reproduce this error on the 3-0-stable branch or on master, please reply with all of the information you have about it and add "[state:open]" to your comment. This will reopen the ticket for review. Likewise, if you feel that this is a very important feature for Rails to include, please reply with your explanation so we can consider it.

    Thank you for all your contributions, and we hope you will understand this step to focus our efforts where they are most helpful.

  • Santiago Pastorino

    Santiago Pastorino February 2nd, 2011 @ 04:29 PM

    • State changed from “open” to “stale”
  • kumojima

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>

Pages