I’m getting everything up and running on win32 with ruby-web and
sqlite3. I’ve gotten quite far and everything was going even smoother
than expected until I ran into the strangeness I’m seeing now and I
just can figure out whats going on.
From my .rb cgi script I can select from the db just fine by doing
db = SQLite3::Database.new( "test1" ) $theUsers = db.execute( "select * from users" ) db.close
But, when I try to insert or delete by doing something like:
db = SQLite3::Database.new( "test1" ) db.execute( "insert into users values( 5, 'Harold' )" ) db.close
db = SQLite3::Database.new( "test1" ) db.execute( "delete from users where id = 2" ) db.close
It raises the following exception:
SQL logic error or missing database
This is highly befuddling to me because all of my interactions with
the database work fine in irb, that is to say that the lines of code
that are failing when run as a cgi under ruby-web don’t fail (read:
work) when typed in by hand to irb. I’ve been able to insert and
delete like a mad man by hand, but when the web-app tries it it fails.
Anyone heard of or seen anything like this before?
Thanks in advance,