# Active Record session store breaks file uploads

**URL:** <https://www.ruby-forum.com/t/active-record-session-store-breaks-file-uploads/140444>\
**Category:** Rails\
**Created:** [June 14, 2008, 3:11am UTC](https://www.ruby-forum.com/t/active-record-session-store-breaks-file-uploads/140444 "2008-06-14T03:11:22Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![adam](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/4af34b/32.png) [@adam](https://www.ruby-forum.com/u/adam)\
**Post date:** [June 14, 2008, 3:11am UTC](https://www.ruby-forum.com/t/active-record-session-store-breaks-file-uploads/140444/1 "2008-06-14T03:11:22Z")

</div>

Hi all,

I recently switched from the default session store  
to :active\_record\_store, and my file uploading (using attachment\_fu)  
has broken. When I select a file to upload, using a standard form, and  
click submit, I am shown an error page:

Status: 500 Internal Server Error  
can’t dump File

In the log this shows up as “TypeError(can’t dump File)”. The stack  
trace suggests that active record store is the culprit - does anyone  
know how to fix this?

Many thanks,  
Adam

---

<div class="post-metadata">

**Author:** ![adam](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/4af34b/32.png) [@adam](https://www.ruby-forum.com/u/adam)\
**Post date:** [June 14, 2008, 12:52pm UTC](https://www.ruby-forum.com/t/active-record-session-store-breaks-file-uploads/140444/2 "2008-06-14T12:52:02Z")

</div>

On Jun 14, 2:10 am, Adam [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> In the log this shows up as “TypeError(can’t dump File)”. The stack  
> trace suggests that active record store is the culprit - does anyone  
> know how to fix this?

Sounds like it’s trying to put something (a File) in the session that  
can’t be stored in the session.

Fred
