# Cookies are not send

**URL:** <https://www.ruby-forum.com/t/cookies-are-not-send/194860>\
**Category:** Rails\
**Created:** [September 12, 2010, 4:02pm UTC](https://www.ruby-forum.com/t/cookies-are-not-send/194860 "2010-09-12T16:02:13Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Norbert\_M](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/aca169/32.png) [@Norbert\_M](https://www.ruby-forum.com/u/Norbert_M)\
**Post date:** [September 12, 2010, 4:02pm UTC](https://www.ruby-forum.com/t/cookies-are-not-send/194860/1 "2010-09-12T16:02:13Z")

</div>

Hello!

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

Here is the login function:

def check  
u = User.first(:conditions =\> [“nick = ?”, params[:user]])

```
if (u != nil) && (u.pass == params[:password])
  session[:user] = u.nick
  session[:lastlogin] = u.lastlogin
  u.lastlogin = Time.current
  u.save
  flash[:notice] = I18n.t("user.login.succesfull")
  redirect_to :controller => "user", :action => "dashboard"
else
  reset_session
  flash[:error] = I18n.t("user.login.userOrPassWrong")
  redirect_to :controller => "user", :action => "login"
end

```

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)
