# Insert new record in Oracle table with RoR

**URL:** <https://www.ruby-forum.com/t/insert-new-record-in-oracle-table-with-ror/129887>\
**Category:** Rails\
**Created:** [February 22, 2008, 12:27pm UTC](https://www.ruby-forum.com/t/insert-new-record-in-oracle-table-with-ror/129887 "2008-02-22T12:27:16Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![sad](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/8797f3/32.png) [@sad](https://www.ruby-forum.com/u/sad)\
**Post date:** [February 22, 2008, 12:27pm UTC](https://www.ruby-forum.com/t/insert-new-record-in-oracle-table-with-ror/129887/1 "2008-02-22T12:27:16Z")

</div>

Hello all, it’s part of my code on RoR ":

Case #1  
Hello all, there is part of my code :  
folder = Folder1.new()  
folder.ID = @id  
folder.CLIENT\_NAME = @un  
folder.TREE\_NAME = @tn  
folder.save()

when i test it on mySQL all work right, but when i try it with Oracle  
i  
got this error #NoMethodError (undefined method `ID=’ for  
#FolderTree:0x4bae7cc).

Case #2  
I try again with other RoR api method  
Folder1.create(:ID =\> @id, :CLIENT\_NAME =\> @un, :TREE\_NAME =\> @tn)

and again got error : #NoMethodError (undefined method `CLIENT\_NAME=’  
for #FolderTree:0x4baf6a4)

Notes:

1. Field id not auto-increment (filled manually)
2. Folder1 it’s model of folder table

It’s exist table structure of folder1 model :  
{  
ID INTERGER  
CLIENT\_NAME VARCHAR2(35 BYTE) NOT NULL,  
TREE\_NAME VARCHAR2(35 BYTE) NOT NULL  
}

Does anybody know why is an error ? Or another path to insert new  
record.

---

<div class="post-metadata">

**Author:** ![sad](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/8797f3/32.png) [@sad](https://www.ruby-forum.com/u/sad)\
**Post date:** [February 22, 2008, 12:36pm UTC](https://www.ruby-forum.com/t/insert-new-record-in-oracle-table-with-ror/129887/2 "2008-02-22T12:36:21Z")

</div>

SaD wrote:

> ```
> folder = Folder1.new()
> folder.ID = @id
> 
> ```
> 
> got this error #NoMethodError (undefined method `ID=’ for  
> #FolderTree:0x4bae7cc).

Can you post the full class definition you have for Folder1? And  
FolderTree?

---

<div class="post-metadata">

**Author:** ![sad](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/8797f3/32.png) [@sad](https://www.ruby-forum.com/u/sad)\
**Post date:** [February 22, 2008, 12:42pm UTC](https://www.ruby-forum.com/t/insert-new-record-in-oracle-table-with-ror/129887/3 "2008-02-22T12:42:18Z")

</div>

you use :ID instead of :id  
MySQL is not case sensitive (at least with it’s column names)  
maybe oracle is?

same goes for :CLIENT\_NAME etc
