Rails 2.0.0 RC1 and activerecord-oci-adapter not found

I’m attempting to test my app on Rails 2.0 RC1. I used this command:
rake rails:freeze:edge TAG=rel_2-0-0_RC1

My database adapter is OCI for Oracle 8i. However, when I try to start
up mongrel in my dev environment, I get the following message:

C:/rails/tms/vendor/rails/activerecord/lib/active_record/
connection_adapters/abstract/connection_specification.rb:231:in
establish_connection': Please install the oci adapter: gem install
activerecord-oci-adapter(no such file to load -- active_record/ connection_adapters/oci_adapter) (RuntimeError) from C:/rails/tms/vendor/rails/activerecord/lib/active_record/ connection_adapters/abstract/connection_specification.rb:215:inestablish_connection’
from C:/rails/tms/vendor/rails/activerecord/lib/active_record/
connection_adapters/abstract/connection_specification.rb:208:in
establish_connection' from C:/rails/tms/vendor/rails/railties/lib/initializer.rb: 234:in initialize_database’
from C:/rails/tms/vendor/rails/railties/lib/initializer.rb:
94:in process' from C:/rails/tms/vendor/rails/railties/lib/initializer.rb: 49:in send’
from C:/rails/tms/vendor/rails/railties/lib/initializer.rb:
49:in run' from C:/rails/tms/config/environment.rb:13 from C:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb: 27:in gem_original_require’
… 25 levels…
from C:/rails/tms/vendor/rails/railties/lib/commands/server.rb:
39
from C:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:
27:in gem_original_require' from C:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb: 27:in require’
from script/server:3

So, I tried to run the suggested command ‘gem install activerecord-oci-
adapter’, but I get the following error:
C:\rails\tms>gem install activerecord-oci-adapter
ERROR: While executing gem … (Gem::GemNotFoundException)
Could not find activerecord-oci-adapter (> 0) in any repository

C:\rails\tms>gem install activerecord-oci-adapter --source
http://gems.rubyonrails.org
ERROR: While executing gem … (Gem::GemNotFoundException)
Could not find activerecord-oci-adapter (> 0) in any repository

When I look around, the string ‘activerecord-oci-adapter’ does not
exist anywhere on google, Rails Trac, or google groups. Does this gem
actually exist? What am I missing?

Thanks,
Ian.

Odd that Rails instructs the user to do something that is impossible,
isn’t it? Hehe… maybe that’s why it’s a Release Candidate.

Well, I had already installed the activerecord-oracle-adapter and I
was still getting the error looking for activerecord-oci-adapter. So,
I went into C:\ruby\lib\ruby\gems\1.8\gems\activerecord-oracle-
adapter-1.0.0\lib\active_record\connection_adapters and renamed
oracle_adapter.rb to oci_adapter.rb. This makes things start working.

Looks like DHH renamed the adapter here:
http://dev.rubyonrails.org/changeset/3718
but this is somehow not working 100% in the RC1. Not really sure where
the problem lies.

Thanks, Fred!

Ian.

On Nov 15, 1:14 pm, Frederick C. [email protected]

On 15 Nov 2007, at 18:03, Ian Z. wrote:

C:\rails\tms>gem install activerecord-oci-adapter --source
http://gems.rubyonrails.org
ERROR: While executing gem … (Gem::GemNotFoundException)
Could not find activerecord-oci-adapter (> 0) in any repository

When I look around, the string ‘activerecord-oci-adapter’ does not
exist anywhere on google, Rails Trac, or google groups. Does this gem
actually exist? What am I missing?

Nope, it doesn’t exist. activerecord-oracle-adapter does however :slight_smile:
( you still need to say --source
http://gems.rubyonrails.org)

Fred

Ian,

I think you are just supposed to change your config/database.yml to look
more like:


development:
adapter: oracle
host: localhost
database: XE
username: user
password: pass

Rather than,

development:
adapter: oci
host: XE
username: user
password: pass

The second snippet is what I had working for 1.2.5.

Now I just have my Rails application bombing on a specific action:

BlaModel Load (0.001817) select * from (select raw_sql_.*, rownum
raw_rnum_ from (SELECT * FROM bla_models WHERE (bla_models.name =
‘ACCT0502’) ) raw_sql_ where rownum <= 1) where raw_rnum_ > 0
/usr/lib/ruby/gems/1.8/gems/activerecord-oracle-adapter-1.0.0/lib/active_record/connection_adapters/oracle_adapter.rb:571:
[BUG] Segmentation fault
ruby 1.8.6 (2007-09-24) [i386-linux]

Any thoughts on this issue? I’m still investigating, but if I can’t
figure it out in the 1 hour I will have to revert back to 1.2.5 for work
sanity.

SP

That did the trick. Thank you very much!

However, I have no idea why you’re getting that segfault. :frowning: I haven’t
come across that yet.

On Nov 24, 5:16 pm, “S. Potter” [email protected]

However, I have no idea why you’re getting that segfault. :frowning: I haven’t
come across that yet.
Actually it was me being a dumb ass. It was two different versions of
my own Ruby/C extension being loaded at the same time in the
LD_LIBRARY_PATH.