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

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
6dd10772cfa5333c5db924091464ed95?d=identicon&s=25 Nacho Sanchez (nachocab)
on 2008-12-21 15:56
(Received via mailing list)
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:in `initialize'

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
Bec38d63650c8912b6ba9b557fb953b9?d=identicon&s=25 Roger Pack (rogerdpack)
on 2008-12-22 09:45
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:in `initialize'

you need gem install sqlite3-ruby
Might not be available yet with 1.9 that's on the edge :)
-=R
This topic is locked and can not be replied to.