From: Dheeraj Gambhir Date: 2009-07-21T22:33:46+09:00 Subject: Re: Ruby/Oracle connectivity Hi Brian, First of all, thanks a lot for replying so quickly. I am using Oracle 9i, ruby 1.8.6 . Till now i have tried: require 'rubygems' gem 'ActiveRecord-JDBC' require 'jdbc_adapter' require 'active_record' require 'active_record/version' ActiveRecord::Base.establish_connection( :adapter => 'jdbc', :driver => 'oracle.jdbc.driver.OracleDriver', :url => 'jdbc:oracle:thin:@myhost:1521:mydb', :username=>'mlbread', :password=>'mlbread' ) ActiveRecord::Base.connection.execute("SELECT * FROM bam_order.ec_invoice") **************************************** It gives following error: C:\Program Files\Watir\examples>ruby oraclecon.rb warning: ActiveRecord-JDBC is for use with JRuby only c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_re quire': no such file to load -- c:/ruby/jruby-1.2.0/lib/ojdbc14.jar (MissingSour ceFile) from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `re quire' from c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/active_suppo rt/dependencies.rb:156:in `require' from c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/active_suppo rt/dependencies.rb:521:in `new_constants_in' from c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/active_suppo rt/dependencies.rb:156:in `require' from oraclecon.rb:6 Regards Dheeraj Gambhir Brian Candler wrote: > Dheeraj Gambhir wrote: >> 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. > > It's much more productive if we take this the other way round: > > 1. Show us what you have tried (exact copy-paste of irb sessions or code > snippets) > > 2. Show us the exact error messages you got (again, copy-paste) > > 3. If there were no error messages, show what the actual behaviour was > of your program, and what you expected it to be. > > It will then be easy for us to help you. For more info, see > http://www.catb.org/~esr/faqs/smart-questions.html#intro > > (and if you haven't seen this before, it's well worth reading the whole > way through) > > Regards, > > Brian. -- Posted via http://www.ruby-forum.com/.