[Rails] Re: Re: Re: Re: HELP !!!!
Wilson Bilkovich
wilsonb at gmail.com
Wed Mar 1 03:44:13 GMT 2006
On 2/28/06, Kim <Kim at dbasol.dk> wrote:
> Tony Gambone wrote:
> > That's true... but you can use INTEGER for the datatype anyway. It is
> > a synonym for a NUMBER with 38 precision and no scale - a 38-digit
> > integer, then, if I remember correctly how that works. You might try
> > using "NUMBER(7,0)" or something, since you probably don't need
> > 38-digit IDs. My guess is, if the second argument is 0, the id will
> > appear in Ruby as an Integer.
>
> It does not help.
>
> I have done this:
>
> ALTER TABLE ALERT_CONTACTS MODIFY (ID NUMBER(7,0))
>
> I guess that I can only conclude that Ruby on Rails are not running on
> Oracle, although it is stated on www.rubyonrails.org.
>
> What a shame ;-(
>
Rails works great on Oracle. I'm using it in a number of apps, and
quite a few others are as well.
Try using a Migration to create your tables from scratch. Then you can
take a look at what a correct schema looks like, and model anything
you do by hand on it.
A Rails-friendly table should have a properly-named sequence, and a
NUMBER(38) NOT NULL PRIMARY KEY column called 'id'.
Here's the code for the Oracle adapter. Check out the
'native_database_types' method to see what it's expecting:
http://dev.rubyonrails.org/svn/rails/trunk/activerecord/lib/active_record/connection_adapters/oci_adapter.rb
--Wilson.
More information about the Rails
mailing list