# Debugging Cookie Behavior

**URL:** <https://www.ruby-forum.com/t/debugging-cookie-behavior/164337>\
**Category:** Rails\
**Created:** [March 31, 2009, 10:07am UTC](https://www.ruby-forum.com/t/debugging-cookie-behavior/164337 "2009-03-31T10:07: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 31, 2009, 10:07am UTC](https://www.ruby-forum.com/t/debugging-cookie-behavior/164337/1 "2009-03-31T10:07:23Z")

</div>

Hi All,

this is getting desperate…

I have a rails applcation setting a cookie like

cookies[:foo] = ‘bar’

At my local development system (Mac 10.5.6, Ruby 1.8.6, Rails 2.2.2)  
mongrel (how do i find out the mongrel version, btw.?) sets this cookie  
both on development and production environment, so everything is fine  
here.

At the live system (Debian, Ruby 1.8.6, Rails 2.2.2, mongrel) The cookie  
is set when i start mongrel with -e development, but not with production  
environment.

I did compare the dev / org environment config files on local and live,  
they are identical. I changed the location where the cookie is set to be  
absolutely sure that the code is processed and changed the value to to a  
static string for testing, but no result. I checked development.log and  
production.log but could find no kind of error message or other hint.

Do you have any further idea what can i do to debug this behavior? i  
think if the system fails to set a cookie it should throw at least any  
error anywhere, how can i find it? Is it possible that the system sets  
the cookie but the browser doesn’t accept it for any reason? Would the  
system get a message from the browser then? Would it store this message  
anywhere?

What else can i do to localize differences between local and live ore  
production and development systems?

Thank you very much for any(!) hint or idea.

D.
