Forum: Ruby Problem Connecting to Oracle

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
5667e35d09d87d70bc3e83f5443d3c49?d=identicon&s=25 Matthew Carlson (mcarlson)
on 2006-01-07 01:42

I'm hoping someone can assist me with a problem I'm having connecting to
a remote Oracle database.

Running windows 2000.  Have Oracle 92 client installed.  The install was
successful, as I'm able to use sqlplus/toad etc without issue

Downloaded oci8 adapter. This too was successful, as I'm able to run
test scripts via the Ruby interpreter against the database with no

When I try to run scaffolding with Rails however, I run into issues.

I took these details from the 2 wiki postings on Oracle.

My database.yml:
  adapter: oci
  host: SID
  username: user
  password: password

With this configuration, I get: ORA-01017: invalid username/password;
logon denied.  Both the user and password are correct though - I am sure
of this.

If I modify the database.yml to the following:
  adapter: oci
  database: SID
  host: HOST/PORT
  username: user
  password: password

I get the following error: ORA-06401: NETCMN: invalid driver designator.
I've googled the hell out of this error, and while the solution seems
straightforward in most of the postings, none of them have been able to
solve my problem.  Either that, or I'm just not understanding some
Oracle functionality very thoroughly...

I've subsequently tried a number of other combinations in the yml,
including using the IP and SID, IP alone, etc..all to no avail.

Any help anyone can offer would be greatly appreciated. I'm happy to
provide more details as well, as I'm anxious to get up and running on
our corporate dbases to show rails off a bit.

25e11a00a89683f7e01e425a1a6e305c?d=identicon&s=25 Wilson Bilkovich (Guest)
on 2006-01-07 07:56
(Received via mailing list)
Try taking the whole (((LOTS)OF)PARENS) definition for your DB from
your TNSNAMES.ORA file, taking out all the line breaks (so it's a
one-liner), and putting that on the host: line.
(Yes, this actually works)

Also, you can take the "database:" line out of the config. The OCI8
adapter doesn't use it.
This topic is locked and can not be replied to.