How do you access SQLite3 via JDBC without using active record?
+1
A:
Install the jdbc-sqlite3 gem
Then, in your jruby script:
require 'jdbc/sqlite3'
url = "jdbc:sqlite:path.to.your.db"
begin
Java::org.sqlite.JDBC #initialize the driver
connection = JavaLang::DriverManager.getConnection(url) #grab your connection
rescue => error
#handle error
end
Samuel Holloway
2009-11-11 19:59:28