Hi, I've tried to access to a Sqlite database, or to create one, but the
result is always the same, when I execute this code:
require 'rubygems'
require 'sqlite3'
dir='C:\\Documents and Settings\\Andrea Marchese\\Desktop\\prova.db'
db = SQLite3::Database.open(dir)
db.execute( "select * from prova" ) do |row|
p row
end
db.close
it stops at the 4th line with this error:
c:/ruby/lib/ruby/1.8/dl/import.rb:29:in `initialize': unknown error
(RuntimeError)
from c:/ruby/lib/ruby/1.8/dl/import.rb:29:in `dlopen'
from c:/ruby/lib/ruby/1.8/dl/import.rb:29:in `dlload'
from c:/ruby/lib/ruby/1.8/dl/import.rb:27:in `each'
from c:/ruby/lib/ruby/1.8/dl/import.rb:27:in `dlload'
from
c:/ruby/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.2.2-mswin32/lib/sqlite3/driver/dl/api.rb:31
from
c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`gem_original_require'
from
c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`require'
from
c:/ruby/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.2.2-mswin32/lib/sqlite3/driver/dl/driver.rb:1
... 9 levels...
from
c:/ruby/lib/ruby/gems/1.8/gems/ruby-debug-ide-0.1.10/lib/ruby-debug.rb:90:in
`main'
from
c:/ruby/lib/ruby/gems/1.8/gems/ruby-debug-ide-0.1.10/bin/rdebug-ide:74
from C:/ruby/bin/rdebug-ide:16:in `load'
from C:/ruby/bin/rdebug-ide:16
I don't know what to do.
Thanks for help!
···
--
Posted via http://www.ruby-forum.com/.