# cookies are not send

**URL:** <https://discuss.rubyonrails.org/t/cookies-are-not-send/54317>\
**Category:** rubyonrails-talk\
**Created:** [September 12, 2010, 8:31am UTC](https://discuss.rubyonrails.org/t/cookies-are-not-send/54317 "2010-09-12T08:31:49Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Norbert\_Melzer1](https://avatars.discourse-cdn.com/v4/letter/n/b782af/32.png) [@Norbert\_Melzer1](https://discuss.rubyonrails.org/u/Norbert_Melzer1)\
**Post date:** [September 12, 2010, 8:31am UTC](https://discuss.rubyonrails.org/t/cookies-are-not-send/54317/1 "2010-09-12T08:31:49Z")

</div>

Hello!

In my production environment there are no cookies sent to the client when using the session hash...

Here is the login function:

&nbsp;&nbsp;def check &nbsp;&nbsp;&nbsp;&nbsp;u = User.first(:conditions =\> ["nick = ?", params[:user]])

&nbsp;&nbsp;&nbsp;&nbsp;if (u != nil) && (u.pass == params[:password]) &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;session[:user] = u.nick &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;session[:lastlogin] = u.lastlogin &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;u.lastlogin = Time.current &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;u.save &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;flash[:notice] = I18n.t("user.login.succesfull") &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;redirect\_to :controller =\> "user", :action =\> "dashboard" &nbsp;&nbsp;&nbsp;&nbsp;else &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;reset\_session &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;flash[:error] = I18n.t("user.login.userOrPassWrong") &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;redirect\_to :controller =\> "user", :action =\> "login" &nbsp;&nbsp;&nbsp;&nbsp;end &nbsp;&nbsp;end

Yes I know it is not optimum but it fits my needs and is also on my schedule to refactor 😃

In the development environment all works well as expected, in production environment on localhost also, but when I deploy to my engineyard for further testing, there are no more cookies sent to the client.

I really dont know where to begin... Since it works with the same config on the localhost but not on the yard (except the database configs)
