Any idea why this fixture would fail to load any data?
<%
%w( Admin Pharmacist PI/Co-PI Research\ Nurse ).each { |g|
Group.create( :name => g ) }
%>
It works perfectly in irb but when I do rake db:fixtures:load I get no
data, no errors, and no error logs.
I realize my fixture doesn''t look like your typical run-of-the-mill
fixture but it''s that way because I''m trying to work around
another
issue with the Oracle Ruby driver. It won''t load fixtures without ids
and it won''t increment the sequence:
admin:
name: Admin
I get this error:
rake aborted!
OCIError: ORA-01400: cannot insert NULL into
("XXX_DEV"."GROUPS"."ID"): INSERT INTO groups
(name) VALUES (''Research
Nurse'')
admin:
id: 10000
name: Admin
When I try to add another record after that fixture I get errors about
non-unique keys:
>> Group.create( :name => ''Foo'' )
ActiveRecord::StatementInvalid: OCIError: ORA-00001: unique constraint
(XXX_DEV.SYS_C0056596) violated: INSERT INTO groups (name, id)
VALUES(''Foo'', 10000)
Thanks.
--
Greg Donald
http://destiney.com/
--~--~---------~--~----~------------~-------~--~----~
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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---