How to debug "save" error?

How can I see why @item.save is failing? I checked debug.log but it is
not being helpful at all…
Is there any other way or log file? Thanks!!!

what debug.log says:…

e[4;35;1mSQL (0.000000)e[0m e[0mBEGINe[0m
e[4;36;1mSQL (0.000000)e[0m e[0;1mCOMMITe[0m

On Mar 26, 12:43 pm, Vic [email protected] wrote:

How can I see why @item.save is failing? I checked debug.log but it is
not being helpful at all…
Is there any other way or log file? Thanks!!!

Perhaps validations are failing for your object?

Try

logger.debug @item.errors.full_messages

right after @item.save, and see if that leads anywhere helpful.

Jeff

Thanks, looking at @item.errors uncovered the problem!!

Jeff C. wrote:

On Mar 26, 12:43 pm, Vic [email protected] wrote:

How can I see why @item.save is failing? I checked debug.log but it is
not being helpful at all…
Is there any other way or log file? Thanks!!!

Perhaps validations are failing for your object?

Try

logger.debug @item.errors.full_messages

right after @item.save, and see if that leads anywhere helpful.

Jeff
softiesonrails.com