Sha256: 92cd947dd5c6a9e24d97b87f380a9625e10332aa56a2ba7f397d319717024ad1

Contents?: true

Size: 699 Bytes

Versions: 3

Compression:

Stored size: 699 Bytes

Contents

require 'jdbc_common'

config = {
  :adapter  => 'oracle',
  :username => ENV["ORACLE_USER"] || 'blog',
  :password => ENV["ORACLE_PASS"] || 'blog',
  :host => ENV["ORACLE_HOST"] || 'localhost',
  :database => ENV["ORACLE_SID"] || 'XE'
}

ActiveRecord::Base.establish_connection(config)

require 'jdbc/oracle'
# Download JDBC driverfrom :
# http://www.oracle.com/technetwork/database/enterprise-edition/jdbc-112010-090769.html
begin
  Java::JavaClass.for_name(Jdbc::Oracle.driver_name)
rescue NameError
  begin
    Jdbc::Oracle.load_driver
  rescue LoadError => e
    puts "Please setup a JDBC driver to run the Oracle tests !"
    raise e
  end
end

ActiveRecord::Base.establish_connection(config)

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
activerecord-jdbc-adapter-1.2.9.1 test/db/oracle.rb
activerecord-jdbc-adapter-1.2.9 test/db/oracle.rb
activerecord-jdbc-adapter-1.2.8 test/db/oracle.rb