Status: 500 Internal Server Error

25 views
Skip to first unread message

fmh

unread,
Jan 24, 2009, 12:57:12 PM1/24/09
to Paperclip Plugin
hello,

if there are errors with the form, I have the following error

in browser : Status: 500 Internal Server Error Content-Type: text/
html

in log file :
/!\ FAILSAFE /!\ Sat Jan 24 18:51:58 +0100 2009
Status: 500 Internal Server Error
no marshal_dump is defined for class Proc

but if my form is valid all goes well.

thx for any help.

Henrik Nyh

unread,
Jan 24, 2009, 2:08:55 PM1/24/09
to papercli...@googlegroups.com
Show code?

Sent from my iPhone

fmh

unread,
Jan 24, 2009, 2:22:53 PM1/24/09
to Paperclip Plugin
in view : <%= f.file_field :image %>

in model : has_attached_file :image,
:styles => {:original => "140x100"},
:url => "/user/img/:id/:style/userimage.jpg",
:path => ":rails_root/public/user/img/:id/:style/userimage.jpg"

in controller :

def update
@user = current_user
flash[:user] = @user

@user.attributes = params[:user]
respond_to do |format|
if @user.update_attributes(params[:user])


else

end
end
end

On Jan 24, 8:08 pm, Henrik Nyh <hen...@nyh.se> wrote:
> Show code?
>
> Sent from my iPhone
>

Jonathan Yurek

unread,
Jan 24, 2009, 4:31:03 PM1/24/09
to papercli...@googlegroups.com
This came up on lighthouse as well. As far as I can tell, it's got
something to do with the fact that validations are procs. For some
reason they're getting marshalled. I don't quite know why, as the
reporter on LH said he didn't have objects in the session (which is
the only reason I can imagine objects would be getting marshalled).
--
Jonathan Yurek, Founder and CTO
thoughtbot, inc.
organic brains. digital solutions.

617.482.1300 x114
http://www.thoughtbot.com/

Henrik Nyh

unread,
Jan 24, 2009, 4:34:56 PM1/24/09
to papercli...@googlegroups.com
In this case there's
flash[:user] = @user
which would stick a user object in the session, so that does sound likely.

fmh

unread,
Jan 24, 2009, 5:59:45 PM1/24/09
to Paperclip Plugin
Indeed the problem is the flash [:user] = @user,
I remove it from the method and I replace with @user = current_user in
the edit view.
flash [:user] = @user helps to recover the validation errors

thx everybody.... :)
Reply all
Reply to author
Forward
0 new messages