Rails 2.0.1 RC2 - activerecord-oracle-adapter not found

Hi,

Does anyone know why gem can’t find activerecord-oracle-adapter?

C:>rails --version
Rails 2.0.1

C:>gem install activerecord-oracle-adapter
ERROR: While executing gem … (Gem::GemNotFoundException)
Could not find activerecord-oracle-adapter (> 0) in any repository

It all started when I tried to run Mongrel on a Win32 box:

C:\web\FDS_Server>mongrel_rails start -e production -p 4001
** Starting Mongrel listening at 0.0.0.0:4001
** Starting Rails with production environment…
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.1/lib/active_record/connection_adapters/abstract/connection_specificatio
n.rb:231:in establish_connection': Please install the oracle adapter:gem install activerecord-oracle-adapter` (no suc
h file to load – active_record/connection_adapters/oracle_adapter)
(RuntimeError)

I installed ruby-oci8 and I’m able to communicate with the Oracle
database located on a remote machine via:
ruby -r oci8 -e “OCI8.new(‘id’, ‘password’, ‘???.???.?.?/xe’).exec(
‘SELECT * FROM THINGS WHERE ID=7’) do |r| puts
r.join(’ | '); end”

The weird thing is that activerecord-oracle-adapter isn’t present on my
development machine… and the application works fine with Mongrel
there.

Thanks,

Chris.

One extra piece of information: on the production machine, I see no
oracle_adapter.rb in
C:\ruby\lib\ruby\gems\1.8\gems\activerecord-2.0.1\lib\active_record\connection_adapters

but there is one on my development machine (running Rails 1.2.6.)…

Chris.

OK, the guys on the Rails France forum told me DHH was in Paris and
didn’t have time to put the file on RubyForge… So in the mean time, I
installed Rails 1.2.6 and was able to get my Production Mongrel running.

Unfortunately, I get an [ORA-12154: TNS:could not resolve the connect
identifier specified] error message as soon as the server code tries to
connect to the remote Oracle database.

I installed Instant Client, so there is no TNSNAMES.ORA file. Instead, I
thought putting the remote IP address of the Oracle server in
database.yml, next to “host:” would do the trick… What am I missing?

Thanks,

Chris.

P.S.: there is no such thing as Rails 2.0.1 RC2, I got mixed up with
Ruby 186-26 RC2…

I even tried adding “port: 1521” to database.yml, to no avail…

This is what finally worked:

database: ???.???.?.?:1521/xe

Chris.

Hi Chris,

Rails 2.0 and later do not ship with Oracle adapter.
You can install the latest Oracle adapter via gem:
gem install activerecord-oracle-adapter
or check it out from svn:
svn co
http://svn.rubyonrails.org/rails/adapters/oracle/lib/active_record/connection_adapters/

2007/12/14, Chris Gers32 [email protected]:


Regards,
Jesse

Hi Jesse,

I ended up upgrading to RubyGems 1.0.0 and Rails 2.0.2, but getting the
Oracle adapter via “gem install activerecord-oracle-adapter” still isn’t
working… So I got it from the SVN repository, like you suggested.

Unless it’s a problem on the Rails side, I wish I knew why I can’t use
“gem install”…

Thanks,

Chris.

Jesse Hu wrote:

Hi Chris,

Rails 2.0 and later do not ship with Oracle adapter.
You can install the latest Oracle adapter via gem:
gem install activerecord-oracle-adapter
or check it out from svn:
svn co
http://svn.rubyonrails.org/rails/adapters/oracle/lib/active_record/connection_adapters/

2007/12/14, Chris Gers32 [email protected]:


Regards,
Jesse

I found this on the Nabble forum (thanks, Jean-François…) :

gem install activerecord-oracle-adapter --source
http://gems.rubyonrails.org

It finally works!

Chris Gers32 wrote:

I found this on the Nabble forum (thanks, Jean-François…) :

gem install activerecord-oracle-adapter --source
http://gems.rubyonrails.org

It finally works!

Didn’t work for me on Windows with Rails 2.0.2 and Gem 1.0.1…

No, the idea is that you’re supposed to install them as plugins, afaik.

On Dec 20, 2007 9:08 PM, Chris Gers32 [email protected]
wrote:

Thanks,

svn co
Regards,
Jesse


Posted via http://www.ruby-forum.com/.


Ryan B.
http://www.frozenplague.net

Could it be due to a temporary problem (server unavailable)? I’ve been
experimenting with installing the whole Ruby/Rails stack in different
OSs (Vista, XP, Win 2003) and works every time, with Rails 2.0.2 and
Gems 1.0.1.

Owen Dall wrote:

Chris Gers32 wrote:

I found this on the Nabble forum (thanks, Jean-François…) :

gem install activerecord-oracle-adapter --source
http://gems.rubyonrails.org

It finally works!

Didn’t work for me on Windows with Rails 2.0.2 and Gem 1.0.1…

If the above solution didn’t work for you try updating your ruby-oci8 library, another resource that I found
to be very helpful was this post at Foliosus.com, although its focus is
the Mac/Leopard setup, it provided enough insight to get oracle working
for me on both *nix and windows environments.

Can anyone please provide me activerecord-oracle-adapter.gem file. I no
longer find it i the rubysource website. Also im doing this install from
local respository versus using gem source repository over internet as I
am behind a firewall on the linux server

Regards

Owen Dall wrote:

Chris Gers32 wrote:

I found this on the Nabble forum (thanks, Jean-François…) :

gem install activerecord-oracle-adapter --source
http://gems.rubyonrails.org

It finally works!

Didn’t work for me on Windows with Rails 2.0.2 and Gem 1.0.1…

I moved this in by had to:
C:\ruby\lib\ruby\gems\1.8\gems\activerecord-2.0.2\lib\active_record\connection_adapters

Frederick C. wrote in post #987224:

On Mar 13, 7:24pm, Sanjeev Me [email protected] wrote:

Can anyone please provide me activerecord-oracle-adapter.gem file. I no
longer find it i the rubysource website. Also im doing this install from
local respository versus using gem source repository over internet as I
am behind a firewall on the linux server

I think these days you want the activerecord-oracle_enhanced-adapter
gem

Fred

Fred - I have installed that but I am trying to create sample
application per
http://www.oracle.com/technetwork/articles/haefel-oracle-ruby-089811.html
and created comics app however when I access it giving errors saying it
needs activerecord-oracle-adapter.

On Sun, Mar 13, 2011 at 2:54 PM, Frederick C. <
[email protected]> wrote:

Fred

Agreed. The gem you are looking for is really old and has been replaced
by activerecord-oracle_enhanced-adapter gem.

B.**

On Mar 13, 7:24pm, Sanjeev Me [email protected] wrote:

Can anyone please provide me activerecord-oracle-adapter.gem file. I no
longer find it i the rubysource website. Also im doing this install from
local respository versus using gem source repository over internet as I
am behind a firewall on the linux server

I think these days you want the activerecord-oracle_enhanced-adapter
gem

Fred

Bryan C. wrote in post #987228:

On Sun, Mar 13, 2011 at 2:54 PM, Frederick C. <
[email protected]> wrote:

Fred

Agreed. The gem you are looking for is really old and has been replaced
by activerecord-oracle_enhanced-adapter gem.

B.**

Figured out the issue. Changed oracle to oracle_enhanced in database.yml
file and was ok after that.

Regards,
Sanjeev.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs