# Oracle\_enhanced problem connection

**URL:** <https://www.ruby-forum.com/t/oracle-enhanced-problem-connection/175336>\
**Category:** Rails\
**Created:** [September 11, 2009, 12:55pm UTC](https://www.ruby-forum.com/t/oracle-enhanced-problem-connection/175336 "2009-09-11T12:55:55Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![xela](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/x/5f9b8f/32.png) [@xela](https://www.ruby-forum.com/u/xela)\
**Post date:** [September 11, 2009, 12:55pm UTC](https://www.ruby-forum.com/t/oracle-enhanced-problem-connection/175336/1 "2009-09-11T12:55:55Z")

</div>

Hello,

I have a problem connecting to the development Oracle database but not  
to production, despite using the same credentials and connecting to the  
same database.

The database is a legacy app that needs a new enhanced front end, so I’m  
not designing a new database just interacting with the existing one.

Here is my database.yml:

development:  
adapter: oracle\_enhanced  
user: user  
password: pass  
database: 123.456.789.123/SID

production:  
adapter: oracle\_enhanced  
user: user  
password: pass  
database: 123.456.789.123/SID

At first I couldn’t connect at all with this setup, so I resorted to  
doing this in the model:

ActiveRecord::Base.establish\_connection(  
:adapter =\> “oracle\_enhanced”,  
:username =\> “user”,  
:password =\> “pass”,  
:database =\> “123.456.789.123/SID”)

This makes the parameters in the database.yml redundant and without it I  
can’t connect to Oracle at all.

Running “./script/server -e production” I can connect to the database  
just fine and do my stuff. But “./script/server -e development” and  
browsing to localhost:3000 I get the following:

/!\ FAILSAFE /!\ Fri Sep 11 11:00:35 +0100 2009  
Status: 500 Internal Server Error  
ORA-01017: invalid username/password; logon denied  
env.c:257:in oci8lib.so  
/usr/lib/ruby/gems/1.8/gems/ruby-oci8-1.0.6/lib/oci8.rb:229:in  
`initialize' /usr/lib/ruby/gems/1.8/gems/activerecord-oracle_enhanced-adapter-1.2.1/lib/active_record/connection_adapters/oracle_enhanced_oci_connection.rb:189:in `new’

The full error pasted here as its a bit long for the message:

[http://pastie.org/613395](http://pastie.org/613395)

My gems list:

rails (2.3.3)\*  
ruby-oci8 (1.0.6)  
activerecord-oracle\_enhanced-adapter (1.2.1)  
actionmailer (2.3.3)  
actionpack (2.3.3)  
activerecord (2.3.3)  
activeresource (2.3.3)  
activesupport (2.3.3)

Why is this acting the way it is?

Thanks for the feedback in advance

- I know that theres a update for the unicode bug, but this is just in  
dev for now.
