# Loading fixtures into oracle

**URL:** <https://www.ruby-forum.com/t/loading-fixtures-into-oracle/119308>\
**Category:** Rails\
**Created:** [November 5, 2007, 11:10pm UTC](https://www.ruby-forum.com/t/loading-fixtures-into-oracle/119308 "2007-11-05T23:10:24Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![destiney](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/f07891/32.png) [@destiney](https://www.ruby-forum.com/u/destiney)\
**Post date:** [November 5, 2007, 11:10pm UTC](https://www.ruby-forum.com/t/loading-fixtures-into-oracle/119308/1 "2007-11-05T23:10:24Z")

</div>

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 D.  
[http://destiney.com/](http://destiney.com/)
