ERROR: no driver for sqlite3 found (Ruby 1.9.0 + Windows)


#1

Hi everyone,
I’m getting this error after I upgraded Ruby from 1.8 to 1.9.0 and
it’s driving me crazy:
“no driver for sqlite3 found”

If I do an irb:
irb(main):001:0> require ‘sqlite3’
=> true
irb(main):002:0> SQLite3::Database.new( ‘my_database.sqlite3’ )
RuntimeError: no driver for sqlite3 found
from c:/ruby/lib/ruby/gems/1.9.0/gems/sqlite3-ruby-1.2.3-x86-
mswin32/lib/sqlite3/database.rb:621:in load_driver' from c:/ruby/lib/ruby/gems/1.9.0/gems/sqlite3-ruby-1.2.3-x86- mswin32/lib/sqlite3/database.rb:74:ininitialize’

My path includes:
c:\ruby\bin
And in that directory I have:
sqlite3.exe
sqlite3.dll
sqlite3.def

which I downloaded from the sqlite page:
http://www.sqlite.org/download.html
(two files with version 3.6.7)

Also, my webrick loads without a problem. So, what am I doing wrong?
Are there any other windows users who have upgraded to 1.9?

Thanks a lot,

Nacho


#2

Nacho Sanchez wrote:

Hi everyone,
I’m getting this error after I upgraded Ruby from 1.8 to 1.9.0 and
it’s driving me crazy:
“no driver for sqlite3 found”

If I do an irb:
irb(main):001:0> require ‘sqlite3’
=> true
irb(main):002:0> SQLite3::Database.new( ‘my_database.sqlite3’ )
RuntimeError: no driver for sqlite3 found
from c:/ruby/lib/ruby/gems/1.9.0/gems/sqlite3-ruby-1.2.3-x86-
mswin32/lib/sqlite3/database.rb:621:in load_driver' from c:/ruby/lib/ruby/gems/1.9.0/gems/sqlite3-ruby-1.2.3-x86- mswin32/lib/sqlite3/database.rb:74:ininitialize’

you need gem install sqlite3-ruby
Might not be available yet with 1.9 that’s on the edge :slight_smile:
-=R