On 20 September 2012 14:22, Enrico Pilotto
<pioz84-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
wrote:> I have a strange issue on my Ruby on Rails app.
> SOMETIMES when a record is being created I get this error:
>
> A ActiveRecord::StatementInvalid occurred in conversations#create:
> Mysql2::Error: Column ''created_at'' cannot be null: ...
> activerecord (3.2.8)
> lib/active_record/connection_adapters/abstract_mysql_adapter.rb:245:in
> `query''
>
> The query generated by activerecord is this:
>
> INSERT INTO `conversations` (`archived_by_performer`,
> `archived_by_requester`, `created_at`, `deleted_by_performer`,
> `deleted_by_requester`, `delta`, `locked`, `performer_hours_assigned`,
> `performer_hours_assigned_at`, `performer_id`, `performer_seal_the_deal`,
> `performer_seal_the_deal_at`, `request_id`, `requester_hours_assigned`,
> `requester_hours_assigned_at`, `requester_id`, `requester_seal_the_deal`,
> `requester_seal_the_deal_at`, `state`, `talent_id`, `unread`, `updated_at`)
> VALUES (0, 0, NULL, 0, 0, 1, 0, 0, NULL, 4, 0, NULL, NULL, 0, NULL, 1, 0,
> NULL, ''new'', 75, 4, NULL)
>
> It happens randomly.
Is there anything unusual about the model? Show us the code for the
action doing the create and the section of the log that corresponds to
the failing action.
Colin
>
> Any idea???
>
> --
> You received this message because you are subscribed to the Google Groups
> "Ruby on Rails: Talk" group.
> To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
> To unsubscribe from this group, send email to
>
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
> To view this discussion on the web visit
> https://groups.google.com/d/msg/rubyonrails-talk/-/hyP3R8xK8-YJ.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
--
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
For more options, visit https://groups.google.com/groups/opt_out.