Hi,
I am trying to learn Ruby and having a problem that doesn't make any sense. I have installed Ruby with the installer and installed the sqlite gem for win32. In my gems directory I have sqlite3-ruby-1.1.0-mswin32 so I assume it installed fine. I have read the FAQ for the SQLite module and written the following code:
require 'sqlite'
db = SQLite::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 )
However when I run it via "ruby db.rb" I get the following error:
C:\Temp>ruby db.rb
c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in `require__': No such file to load -- sqlite (LoadError)
from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in `re
quire'
from db.rb:1
Any ideas on what is wrong???