J
jhs408
Your Help please:
I have installed sqlite3 in directory : c:\tools\sqlite3\
and performed gem install : gem install sqlite3-ruby-1.2.3-
mswin32.gem
test2.rb program:
#--------------------------------------------------------------
require 'rubygems'
require 'sqlite3/database'
require 'sqlite3'
File.delete "test.db" rescue nil
db = SQLite3:atabase.new( "test.db" )
sql = <<SQL
create table the_table (
a varchar2(30),
b varchar2(30)
);
insert into the_table values ( 'one', 'two' );
insert into the_table values ( 'three', 'four' );
insert into the_table values ( 'five', 'six' );
SQL
db.execute_batch( sql )
db.execute( "select * from the_table" ) do |row|
p row
end
#-----------------------------------------------------------
** upon executing the program: ruby test2.rb
it can not file sqlite3.dll
But when I move aa copy of sqlite3.dll into the same directory as
test2.rb
then everything runs OK.
Question: How do I condition sqlite3-ruby to load the sqlite3.dll
from the directory c:\tools\sqlite3?
Thanks for your assistance,
John
I have installed sqlite3 in directory : c:\tools\sqlite3\
and performed gem install : gem install sqlite3-ruby-1.2.3-
mswin32.gem
test2.rb program:
#--------------------------------------------------------------
require 'rubygems'
require 'sqlite3/database'
require 'sqlite3'
File.delete "test.db" rescue nil
db = SQLite3:atabase.new( "test.db" )
sql = <<SQL
create table the_table (
a varchar2(30),
b varchar2(30)
);
insert into the_table values ( 'one', 'two' );
insert into the_table values ( 'three', 'four' );
insert into the_table values ( 'five', 'six' );
SQL
db.execute_batch( sql )
db.execute( "select * from the_table" ) do |row|
p row
end
#-----------------------------------------------------------
** upon executing the program: ruby test2.rb
it can not file sqlite3.dll
But when I move aa copy of sqlite3.dll into the same directory as
test2.rb
then everything runs OK.
Question: How do I condition sqlite3-ruby to load the sqlite3.dll
from the directory c:\tools\sqlite3?
Thanks for your assistance,
John