Oracle_enhanced problem connection

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

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.