-
Notifications
You must be signed in to change notification settings - Fork 384
Open
Description
Hi,
I'm trying this script, but it failed. I've referred to many scripts:
- https://github.com/flum1025/jruby_sqlite3/blob/3c8f677b97592a81f2f4fdf38d7241f64391faf6/lib/jruby_sqlite3/jruby_sqlite3.rb#L15
- https://github.com/jeremyevans/sequel/blob/41e621fe1051441cf61d009bb76e3f7f7411f3b8/lib/sequel/adapters/jdbc/sqlite.rb#LL3C54-L3C54
- https://github.com/jruby/jruby/wiki/JDBC
require 'jdbc/sqlite3'
Jdbc::SQLite3.load_driver
Java::org.sqlite.JDBC
url = "jdbc:sqlite:test.db"
con = java.sql.DriverManager.get_connection url
#=> No suitable driver found for jdbc:sqlite3:test.db (Java::JavaSql::SQLException)
Even the https://rubygems.org/gems/jdbc-sqlite3 description said we only need Jdbc::SQLite3.load_driver
to load the driver.
What am I missing? (I'm not interested using sequel
or active_record
now, I just want to try the driver directly). Thanks in advance!
Metadata
Metadata
Assignees
Labels
No labels