Topic: Setting up Ruby with Oracle.

I'm trying to get ruby going with Oracle without much success, i can connect to it with the following rb test file:

require 'oci8'

connection = OCI8.new('dbname', 'username', 'password')
connection.exec("select * from dual") do |row|
puts 'dummy: ' + row[0]
end
connection.logoff

but when i change the details in the database.yml file and try to generate the scaffold i get:

      exists  app/controllers/
      exists  app/helpers/
      exists  app/views/operational_risks
      exists  app/views/layouts/
      exists  test/functional/
  dependency  model
      exists    app/models/
      exists    test/unit/
      exists    test/fixtures/
   identical    app/models/operational_risk.rb
   identical    test/unit/operational_risk_test.rb
   identical    test/fixtures/operational_risks.yml
"DESC operational_risks" failed; does it exist?

Not sure what exactly i'm doing wrong?

Re: Setting up Ruby with Oracle.

Set the database.yml configuration as

development:
adapter: oci
  database: ORCL
  username: OE
  password: password
  host:

Re: Setting up Ruby with Oracle.

I have the exact same issue. Tried your solution and got the error
ORA-12545: Connect failed because target host or object does not exist

When I try the following in database.yml,

development:
  adapter: oci
  database:
  username: <user name>
  password: <password>
  host: //<hostname>:<port number>/<service name>
the command ruby script/generate scaffold myidrpt myidrpt got the following error:

      exists  app/controllers/
      exists  app/helpers/
      exists  app/views/myidrpt
      exists  app/views/layouts/
      exists  test/functional/
  dependency  model
      exists    app/models/
      exists    test/unit/
      exists    test/fixtures/
   identical    app/models/myidrpt.rb
   identical    test/unit/myidrpt_test.rb
   identical    test/fixtures/myidrpts.yml
"DESC myidrpts" failed; does it exist?

Re: Setting up Ruby with Oracle.

I figured it out. It needs an Oracle object with the name myidrpts.