Forum: Ruby on Rails How to solve "Marshal Data Too Short" error?

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
15c43b9d84557e8547eea759ee3ba016?d=identicon&s=25 Victor Fan (victorfan)
on 2006-05-30 22:41
Hi

I've got the error in the log file "marshal data too short" after I try
to store some data into session.

After doing some research on the internet, it looks like the problem was
caused by pstore.rb.  It is there way to solve this problem?

Thank you
15c43b9d84557e8547eea759ee3ba016?d=identicon&s=25 Victor Fan (victorfan)
on 2006-05-30 22:44
What I did is the following

session['id'] = nil
or
session['id'] = some value
6c27f78ab0eee78732ae54e8b8718b84?d=identicon&s=25 David Felstead (Guest)
on 2006-05-31 06:57
(Received via mailing list)
Which session store are you using?  If it's the ActiveRecord store,
the error can occur when the data in your session exceeds the size of
the 'data' column in your sessions table.  You can either increase the
size of the data field, or examine more closely what is being stored
in your session data.

Cheers,

-DF
Da828b27a295fe67c31a4d64f751d6cd?d=identicon&s=25 Victor Fan (victorfan88)
on 2006-05-31 16:13
David Felstead wrote:
> Which session store are you using?  If it's the ActiveRecord store,
> the error can occur when the data in your session exceeds the size of
> the 'data' column in your sessions table.  You can either increase the
> size of the data field, or examine more closely what is being stored
> in your session data.
>
> Cheers,
>
> -DF

Thank you David

I am trying to store one integer (the id) into the session and the value
is < 100.
89441a6c74647d292f5cc951eae24cfa?d=identicon&s=25 Jack Christensen (Guest)
on 2006-05-31 17:12
(Received via mailing list)
_______________________________________________
Rails mailing list
Rails@lists.rubyonrails.org
http://lists.rubyonrails.org/mailman/listinfo/rails
Da828b27a295fe67c31a4d64f751d6cd?d=identicon&s=25 Victor Fan (victorfan88)
on 2006-06-01 00:09
Jack Christensen wrote:
> _______________________________________________
> Rails mailing list
> Rails@lists.rubyonrails.org
> http://lists.rubyonrails.org/mailman/listinfo/rails

Jack, can you submit your message again?  I can only see an empty
message.

Thank you

Victor
Da828b27a295fe67c31a4d64f751d6cd?d=identicon&s=25 Victor Fan (victorfan88)
on 2006-06-01 17:06
Just another thought, is there any other way to replace the use of
session hash?

Thank you for replying!

Victor
This topic is locked and can not be replied to.