Re: Importing existing Oracle DB to Ruby

Use rake to generate a model for your existing table in Oracle (once you
have set up the database.yml in config, as Francois already
said)…“rake generate model Foo”. Then, use
the line “set_table_name ‘bar’” in the model class to specify the Oracle
table name. You may also have to use commands like that to set the
primary key, etc.

Fromthere you can generate a scaffold, “rake generate scaffold Foo”. If
prompted, don’t overwrite the existing model class file. That will give
you scaffold views into your existing Oracle data.