Enrico Teotti
2006-Nov-04 02:26 UTC
[Rails] PostgreSQL ActiveRecord default localized date assigned in test env
Hi, today I''ve configured an XUbuntu as workstation (ok I know...). Using the following packages to make Rails interact with Postgres: ii libpgsql-ruby1.8 0.7.1-7 ii postgresql-8.1 8.1.4-0ubuntu1 using rails 1.1.6 from gems. The problem came up just on the testing environment, when I save a model I get a: ActiveRecord::StatementInvalid: PGError: ERROR: invalid input syntax for type date: "ven set 15 12:00:00 CEST 2006" I never setted that (date) field in the test code, neither in the method, and in the DB column definition there ain''t default value. So, merry christmas, :-) does it just came up from nowhere? And it is formatted like my current locale config (italian). Using script/console and doing the same stuff I did in the test method it saves it with no problem. I''m with no clue, and right now I can''t test this very code on another machine, but I''m pretty sure it didn''t screw up like this when I worked on the OSX using the fink packages (sorry I don''t remember the versions). Anybody has some clues? Thanks, Enrico -- "Complete independence does not mean arrogant isolation or a superior disdain for all help." -Mahatma Gandhi