From 0fb6ab1dd8e6de68477483be01108d88339e2799 Mon Sep 17 00:00:00 2001 From: silkPK Date: Thu, 28 Sep 2023 16:56:24 +0200 Subject: [PATCH 1/2] Fix ORA-12505 When Connecting Using Jdbc --- lib/plsql/jdbc_connection.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/plsql/jdbc_connection.rb b/lib/plsql/jdbc_connection.rb index 3b9e127..f9d76d9 100644 --- a/lib/plsql/jdbc_connection.rb +++ b/lib/plsql/jdbc_connection.rb @@ -52,8 +52,8 @@ def self.create_raw(params) url = if ENV["TNS_ADMIN"] && database && !params[:host] && !params[:url] "jdbc:oracle:thin:@#{database}" else - database = ":#{database}" unless database.match(/^(\:|\/)/) - params[:url] || "jdbc:oracle:thin:@#{params[:host] || 'localhost'}:#{params[:port] || 1521}#{database}" + database = "/#{database}" unless database.match(/^(\:|\/)/) + params[:url] || "jdbc:oracle:thin:@//#{params[:host] || 'localhost'}:#{params[:port] || 1521}#{database}" end new(java.sql.DriverManager.getConnection(url, params[:username], params[:password])) end From 3fb328bea374a68d62bbfd25cee8453492d5bf0a Mon Sep 17 00:00:00 2001 From: silkPK Date: Thu, 28 Sep 2023 17:04:57 +0200 Subject: [PATCH 2/2] changed version --- History.txt | 6 +++++- VERSION | 2 +- ruby-plsql.gemspec | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/History.txt b/History.txt index 496b030..86f2539 100644 --- a/History.txt +++ b/History.txt @@ -1,3 +1,7 @@ +== 0.8.1 2023-09-28 +* Improvements + * Support Oracle Database 23c [#229] + == 0.8.0 2021-08-10 * Improvements and fixes * Support Rails 6.1 [#193] @@ -24,7 +28,7 @@ == 0.7.1 2018-09-03 * Fix - * Address incorrect versions in Gemfile + * Address incorrect versions in Gemfile == 0.7.0 2018-09-03 * Improvements and fixes diff --git a/VERSION b/VERSION index a3df0a6..6f4eebd 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.8.0 +0.8.1 diff --git a/ruby-plsql.gemspec b/ruby-plsql.gemspec index 8c140e3..a5e01cc 100644 --- a/ruby-plsql.gemspec +++ b/ruby-plsql.gemspec @@ -3,11 +3,11 @@ # Instead, edit Juwelier::Tasks in Rakefile, and run 'rake gemspec' # -*- encoding: utf-8 -*- -# stub: ruby-plsql 0.8.0 ruby lib +# stub: ruby-plsql 0.8.1 ruby lib Gem::Specification.new do |s| s.name = "ruby-plsql".freeze - s.version = "0.8.0" + s.version = "0.8.1" s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version= s.require_paths = ["lib".freeze]