jnicklas/carrierwave-mongoid — Issue #33: Issues with Mongoid > 2.4.0
Author: onyxrev
Created: 2012-02-28 12:00:31+00:00
State: open

I upgraded to Mongoid 2.4.5 to get compatibility with Rails 3.2. Unfortunately for my app this broke carrierwave-mongoid. I walked versions down until I found the issue cropped up around Mongoid 2.4.0

What I'm seeing is

"Cannot serialize an object of class ActionDispatch::Http::UploadedFile into BSON"

when one uploads a file to a model with an attached mount. I spent hours trying to figure out what's going on but didn't get too far. It seems that fundamentally it's not able to commit the data to the database.

This was working prior to the upgrade, so it's not the normal suspects for this error like improperly named fields and the like. Reverting back to Mongoid 2.3.4, which is what I was using, works.