I use devise for authentication and want the following to work:
Addendum: if it still doesn't work although you're pretty sure you deleted your old cookies, rename the cookie's key – just to make sure. (after hours of troubleshooting, this was all I really had to do to make it work.)