On Jan 24, 6:08=A0am, jhs... / gmail.com wrote:
> Your Help please:
>
> I have installed sqlite3 in directory : =A0c:\tools\sqlite3\
> and performed gem install : =A0gem install sqlite3-ruby-1.2.3-
> mswin32.gem
>
> test2.rb =A0program:
> #--------------------------------------------------------------
> require 'rubygems'
> require 'sqlite3/database'
> =A0 require 'sqlite3'
>
> =A0 File.delete "test.db" rescue nil
>
> =A0 =A0db =3D SQLite3::Database.new( "test.db" )
> =A0sql =3D <<SQL
> =A0 =A0 =A0create table the_table (
> =A0 =A0 =A0 =A0a varchar2(30),
> =A0 =A0 =A0 =A0b varchar2(30)
> =A0 =A0 =A0);
>
> =A0 =A0 =A0insert into the_table values ( 'one', 'two' );
> =A0 =A0 =A0insert into the_table values ( 'three', 'four' );
> =A0 =A0 =A0insert into the_table values ( 'five', 'six' );
> SQL
>
> =A0 =A0db.execute_batch( sql )
>
> db.execute( "select * from the_table" ) do |row|
> =A0 =A0 p row
> =A0 end
> #-----------------------------------------------------------
>
> ** upon executing the program: =A0ruby test2.rb
>
> =A0 =A0it 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: =A0How do I condition sqlite3-ruby to load the sqlite3.dll
> from the directory c:\tools\sqlite3?
>
> Thanks for your assistance,
> John

Put c:\tools\sqlite3 in the PATH environment variable.