# Cookie not written in production environment

**URL:** <https://www.ruby-forum.com/t/cookie-not-written-in-production-environment/162667>\
**Category:** Rails\
**Created:** [March 12, 2009, 4:42pm UTC](https://www.ruby-forum.com/t/cookie-not-written-in-production-environment/162667 "2009-03-12T16:42:23Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![liberte](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/9e8a1a/32.png) [@liberte](https://www.ruby-forum.com/u/liberte)\
**Post date:** [March 12, 2009, 4:42pm UTC](https://www.ruby-forum.com/t/cookie-not-written-in-production-environment/162667/1 "2009-03-12T16:42:23Z")

</div>

Hi there,

Rails 2.2.2 on Debian Server.

i’m setting a cookie like

cookies[:tg\_usn] = {  
:value =\> @user.username,  
:expires =\> 5.day.from\_now,  
}

This work’s fine in development environment, but when i start mongrel  
with production environment (same server, same network), no cookie is  
set by the application.

Any ideas what’s happening here?

thanx a lot for any help,

regards  
D.
