Forum: Ruby on Rails Strange Record not saved errors

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
D75f4b92f64038bcb02995694c1c9984?d=identicon&s=25 jeroen (Guest)
on 2007-03-26 10:20
(Received via mailing list)
I have a site with an acts_as_authenticated based login which has
started throwing up some strange errors. Until a few days ago
everything worked fine but all of a sudden 'RecordNotSaved' errors are
popping up in my logs.

When I check the database, it looks like the record _is_ saved but I
think users get an error so I'm starting to see a lot of double/triple
entries for the same user. It doesn't happen all the time and I can't
really reproduce it myself and the log entry is not very helpful so I
have no idea how to solve this.. I am not even sure which direction to
look.. could it be related to mysql performance errors or something?

This is the error I'm getting:

A ActiveRecord::RecordNotSaved occurred in account#signup:

1398:in `save_without_validation!'
Af9a9013100ddf2dbb0ca13487b60f8b?d=identicon&s=25 Ivor Paul (Guest)
on 2007-03-26 12:41
(Received via mailing list)
this looks like it happens when you try to sign up a new user. does it
happen with other actions aswell or is it specific to signup?

What does your controller function for signup look like and can you post
user model?
In my user model I have these validations that could be causes problems
you if they are present in your model.

  validates_presence_of     :login, :email
  validates_presence_of     :password,                   :if =>
  validates_presence_of     :password_confirmation,      :if =>
  validates_length_of       :password, :within => 4..40, :if =>
  validates_confirmation_of :password,                   :if =>
  validates_length_of       :login,    :within => 3..40
  validates_length_of       :email,    :within => 3..100
  validates_uniqueness_of   :login, :email, :case_sensitive => false
  before_save :encrypt_password

Da75e1c8205aed8912f5e886ba434d68?d=identicon&s=25 EgonJGF (Guest)
on 2007-03-26 14:04
(Received via mailing list)
You haven't recently started using clustered servers, have you?
This topic is locked and can not be replied to.