If i run this code to check whether i am able to connect to the Oracle
database server or not:

ruby -r oci8 -e "OCI8.new('mlbread', 'mlbread', 'MLBD').exec('select *
from bam_order.ec_invoice where order-id>2316027') do |r| puts r.join
(' | '); end"

It gives me:

C:\ruby>ruby -r oci8 -e "OCI8.new('mlbread', 'mlbread', 'MLBD').exec
('select * f
rom bam_order.ec_invoice where order-id>2316027') do |r| puts r.join('
| '); end
"
c:/ruby/lib/ruby/site_ruby/1.8/oci8.rb:52:in `init': OCI Library
Initialization
Error (OCIError)
        from c:/ruby/lib/ruby/site_ruby/1.8/oci8.rb:52

Regards
D G

On Jul 21, 6:55 pm, Dheeraj Gambhir <checktestingthi...@gmail.com>
wrote:
> I am using oracle client from past 2 years, so do i need to re-
> install?. I don't think so.
>
> Now after re-installing "ruby-oci8-1.0.6-mswin32", i am getting the
> following error now:
>
> C:\Program Files\Watir\examples>ruby oraclecon.rb
> warning: ActiveRecord-JDBC is for use with JRuby only
> c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_record/
> connection_a
> dapters/abstract/connection_specification.rb:76:in
> `establish_connection': Pleas
> e install the jdbc adapter: `gem install activerecord-jdbc-adapter`
> (no such fil
> e to load -- java) (RuntimeError)
>         from oraclecon.rb:7
>
> I re-install ruby-oci8-1.0.6-mswin32 because earlier i was getting
> oci.dll missing error.
>
> Regards
> Dheeraj Gambhir
>
> On Jul 21, 6:45 pm, Felipe Knorr Kuhn <fkn...@gmail.com> wrote:
>
> > Did you download and install the Instant Client as described in the guide?
>
> >  "Download at least two packages "Instant Client Package - *Basic*" and
> > "Instant Client Package - *SDK*" from Oracle Technology
> > Network<http://www.oracle.com/technology/tech/oci/instantclient/index.html>
> > .
>
> > note: use 32-bit packages for 32-bit ruby even though the OS is 64-bit."
>
> > FK
>
> > On Tue, Jul 21, 2009 at 10:43 AM, Dheeraj Gambhir <
>
> > checktestingthi...@gmail.com> wrote:
>
> > > Hi,
>
> > > I am getting oci.dll missing error on running the code given by you:
>
> > > require 'oci8'
>
> > > connection = OCI8.new(mlbread,mlbread,MLBD)
> > > sql = 'select * from bam_order.ec_invoice where created_date>sysdate-2'
>
> > > connection.exec(sql) do |row|
> > >   puts row
> > > end
>
> > > Regards
> > > D G
>
> > > On Tue, Jul 21, 2009 at 6:55 PM, Ivan Kabluchkov 
> > > <ikabluch...@gmail.com>wrote:
>
> > >> Installhttp://rubyforge.org/projects/ruby-oci8/
>
> > >> And example of code:
>
> > >> require 'oci8'
>
> > >> connection = OCI8.new(<user>, <pass>, <scheme>)
> > >> sql = 'select * from table'
>
> > >> connection.exec(sql) do |row|
> > >>   puts row
> > >> end
>
> > >> On 21 июл, 17:06, Dheeraj Gambhir <checktestingthi...@gmail.com>
> > >> wrote:
> > >> > Hi All,
>
> > >> > I have tried my level best to connect to oracle using ruby but all in
> > >> > vain.
>
> > >> > Can any one provide concrete steps to follow to do that.
> > >> > Please list down what all we require for this.
>
> > >> > Thanks in advance.
>
> > >> > Regards
> > >> > Dheeraj Gambhir
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~----------~----~----~----~------~----~------~--~---

Reply via email to