Forked from altherlex/(dalli_memcache-client; rails3; ruby1.9; mongodb, Marshel).rb
Created
August 2, 2017 06:24
-
-
Save railsfactory-kumaresan/96c7cffa4bc1d2020bd84929a4f94417 to your computer and use it in GitHub Desktop.
You are trying to cache a Ruby object which cannot be serialized to memcached.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Marshalling error for key '_my_session:1243f4a7a0c8d1dba363bc2ca7a246e8': singleton can't be dumped | |
You are trying to cache a Ruby object which cannot be serialized to memcached. | |
/usr/local/rvm/gems/ruby-1.9.3-p484/gems/dalli-2.7.0/lib/dalli/server.rb:398:in `dump' | |
#Controller problem | |
session[:telefones] = Cliente.telefones | |
#Solution | |
session[:telefones] = Cliente.telefones.entries | |
# Monthpack: Global Solution | |
module Dalli | |
class Server | |
def serialize_with_modification(key, value, options=nil) | |
serialize_without_modification(key, value.entries, options=nil) | |
end | |
alias_method_chain :serialize, :modification | |
end | |
end | |
# Read the post: http://testandocomtesta.blogspot.com.br/2014/02/rails3-ruby19-dalli-memcache-client.html |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment