frostilicus
frostilicus

Reputation: 11

Ruby on Rails sqlite3 entry point not found

I'm unable to get Ruby on Rails working anymore (fiddled with Ruby [not Rails] a while ago, bla bla), and I'm stuck for a reason/fix for my problem. I'm running XP, Ruby 1.9.2 (p180), sqlite3 (1.3.3 x86-mingw32), rails (3.0.7), and here is basically what I did earlier tonight:

  1. DL/Install Ruby (rubyinstaller-1.9.2-p180)
  2. DL sqlite3.exe, .dll, and .def, placed them in the \ruby192\bin\ directory (also note after the problem, I placed the .exe, .dll, and .def in the lib directory for the sqlite3 gem)
  3. gem install sqlite3, activesupport, and rails (in that order)
  4. rails new demo
  5. (in the newly created folder) rails s

and what I get out of all this...

The procedure entry point sqlite3_column_database_name could not be located in the dynamic link library sqlite3.dll

 C:/Ruby192/lib/ruby/gems/1.9.1/gems/sqlite3-1.3.3-x86-mingw32/lib/sqlite3.rb:6:i
n `require': no such file to load -- sqlite3/sqlite3_native (LoadError)
 from C:/Ruby192/lib/ruby/gems/1.9.1/gems/sqlite3-1.3.3-x86-mingw32/lib/s
qlite3.rb:6:in `rescue in <top (required)>'
 from C:/Ruby192/lib/ruby/gems/1.9.1/gems/sqlite3-1.3.3-x86-mingw32/lib/s
qlite3.rb:2:in `<top (required)>'
 from C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.12/lib/bundler/runt
ime.rb:68:in `require'
 from C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.12/lib/bundler/runt
ime.rb:68:in `block (2 levels) in require'
 from C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.12/lib/bundler/runt
ime.rb:66:in `each'
 from C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.12/lib/bundler/runt
ime.rb:66:in `block in require'
 from C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.12/lib/bundler/runt
ime.rb:55:in `each'
 from C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.12/lib/bundler/runt
ime.rb:55:in `require'
 from C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.12/lib/bundler.rb:1
20:in `require'
 from C:/ruby/demo/config/application.rb:7:in `<top (required)>'
 from C:/Ruby192/lib/ruby/gems/1.9.1/gems/railties-3.0.7/lib/rails/comman
ds.rb:28:in `require'
 from C:/Ruby192/lib/ruby/gems/1.9.1/gems/railties-3.0.7/lib/rails/comman
ds.rb:28:in `block in <top (required)>'
 from C:/Ruby192/lib/ruby/gems/1.9.1/gems/railties-3.0.7/lib/rails/comman
ds.rb:27:in `tap'
 from C:/Ruby192/lib/ruby/gems/1.9.1/gems/railties-3.0.7/lib/rails/comman
ds.rb:27:in `<top (required)>'
 from script/rails:6:in `require'
 from script/rails:6:in `<main>'

Upvotes: 1

Views: 587

Answers (2)

Avanst
Avanst

Reputation: 2265

I had the exact same problem on my windows 7 x64 box with the exact same rails and ruby version as you. I found out the latest version of sqlite3, version 3.7.6.2, that I had seems to be incompatible. I was able to download 3.7.4 via this link: sqlite3 version 3.7.4.

Using version 3.7.4 by just replacing the sqlite3 dll file in my ruby\bin directory worked like a charm for me

Upvotes: 0

Vlad Khomich
Vlad Khomich

Reputation: 5880

yeah, had similar problem on my windows laptop recently.

the problem is that you're using the most recent sqlite3 binaries, but the gem doesn't seem to be able to work with these. Unfortunately, I don't remember what exact version of sqlite3 binaries solved. Just try few previous versions

Upvotes: 1

Related Questions