Varients of this problem have been posted before. However none of the
solutions have worked for me. Therefore I started with a clean slate.
(1) uninstalled and reinstalled Ruby (version 1.8.6) into standard
directory C:\Ruby using standard installer.
(2) Went to http://sqlite.org/download.html and downloaded
sqlite-3_6_16.zip and sqlitedll-3_6_16.zip to C:\SQLite. Extracted the
files there.
(3) Copied sqlite3.dll and sqlite3.exe to C:\Ruby\bin
(4) Launched a command window, went to C:\Ruby\bin, and executed: ┼╚em
install sqlite3-ruby -v 1.2.3Results were positive:
===
C:\Ruby\bin>gem install sqlite3-ruby -v 1.2.3
Successfully installed sqlite3-ruby-1.2.3-x86-mswin32
1 gem installed
Installing ri documentation for sqlite3-ruby-1.2.3-x86-mswin32...
Installing RDoc documentation for sqlite3-ruby-1.2.3-x86-mswin32...
===

No problems detected so far. So I created a very simple script in C:
\Ruby\bin called sql1.rb:
===
require 'sqlite3'
db = SQLite3::Database.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 test" )
===

Result is this:
===
C:\Ruby\bin>ruby sql1.rb
./sqlite3.dll: 127: The specified procedure could not be found.   -
Init_sqlite3 (LoadError)
./sqlite3.dll
        from sql1.rb:2
===

Same error occurs if the only line in the Ruby script is the: require
'sqlite3'

Machine is an XP machine. Does not have a C:\windows\system32
directory but just in case there was some unknown hard coded
dependency I created that and copied the two sqlite files there
(the .dll and .exe). That did not fix the problem.

The problem is not that C:\Ruby\bin is not in the PATH variable, I
execute "set" and can see it right in the path.

Does anyone have any idea where the root cause of the problem might be?