找不到Ruby on Rails sqlite3入口点

时间:2011-04-20 05:27:25

标签: ruby-on-rails sqlite

我不能再让Ruby on Rails工作了(不久前摆弄了Ruby [not Rails],bla bla),而我因为我的问题而陷入困境。 我正在运行XP,Ruby 1.9.2(p180),sqlite3(1.3.3 x86-mingw32),rails(3.0.7),这基本上是我今晚早些时候做的:

  1. DL /安装Ruby(rubyinstaller-1.9.2-p180)
  2. DL sqlite3.exe,.dll和.def,将它们放在\ ruby​​192 \ bin \目录中(注意问题之后,我将.exe,.dll和.def放在lib目录中sqlite3 gem)
  3. gem install sqlite3,activesupport和rails(按此顺序)
  4. rails new demo
  5. (在新创建的文件夹中)rails s
  6. 以及我从这一切中得到的......

    无法在动态链接库sqlite3.dll中找到过程入口点sqlite3_column_database_name

     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>'
    

2 个答案:

答案 0 :(得分:1)

是的,最近我的Windows笔记本电脑出现了类似的问题。

问题是你正在使用最新的sqlite3二进制文件,但gem似乎无法使用这些。不幸的是,我不记得sqlite3二进制文件的确切版本是什么。试试几个以前的版本

答案 1 :(得分:0)

我在我的Windows 7 x64盒子上遇到了完全相同的问题,其中包含完全相同的rails和ruby版本。我发现最新版本的sqlite3,版本3.7.6.2,我似乎不兼容。我可以通过以下链接下载3.7.4:sqlite3 version 3.7.4

使用版本3.7.4只需替换我的ruby \ bin目录中的sqlite3 dll文件,就像我的魅力一样