无法加载这样的文件 - sqlite3/sqlite3_native(LoadError)
问题描述:
我很抱歉,如果这个问题没有用,但我还没有找到解决方案在这里或在互联网上的这个问题。无法加载这样的文件 - sqlite3/sqlite3_native(LoadError)
我在Windows 10(64位)上运行我的Rails服务器。我有钢轨版本4.2.1和红宝石版本2.2.4。
我已经遵循了许多教程来fx这个,但它没有奏效。我试过卸载sqlite3并重新安装一次。我下载了新的dll文件,并将其替换为ruby22-x64/bin。
C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/sqlite3-1.3.10-x64-mingw32/lib/sqlite3.rb:6:in `require': cannot load such file -- sqlite3/sqlite3_native (LoadError)
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/sqlite3-1.3.10-x64-mingw32/lib/sqlite3.rb:6:in `rescue in <top (required)>'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/sqlite3-1.3.10-x64-mingw32/lib/sqlite3.rb:2:in `<top (required)>'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/bundler-1.11.2/lib/bundler/runtime.rb:77:in `require'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/bundler-1.11.2/lib/bundler/runtime.rb:77:in `block (2 levels) in require'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/bundler-1.11.2/lib/bundler/runtime.rb:72:in `each'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/bundler-1.11.2/lib/bundler/runtime.rb:72:in `block in require'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/bundler-1.11.2/lib/bundler/runtime.rb:61:in `each'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/bundler-1.11.2/lib/bundler/runtime.rb:61:in `require'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/bundler-1.11.2/lib/bundler.rb:99:in `require'
from C:/Projekty/Atelier/config/application.rb:7:in `<top (required)>'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/railties-4.2.1/lib/rails/commands/commands_tasks.rb:78:in `require'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/railties-4.2.1/lib/rails/commands/commands_tasks.rb:78:in `block in server'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/railties-4.2.1/lib/rails/commands/commands_tasks.rb:75:in `tap'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/railties-4.2.1/lib/rails/commands/commands_tasks.rb:75:in `server'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/railties-4.2.1/lib/rails/commands/commands_tasks.rb:39:in `run_command!'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/railties-4.2.1/lib/rails/commands.rb:17:in `<top (required)>'
from bin/rails:8:in `require'
from bin/rails:8:in `<main>'
答
尝试与官方的编译器指令本地安装:
gem install sqlite3 -- --with-sqlite3-include=dir --with-sqlite3-lib=dir
答
在Windows中,使用Ruby 2.2.2
bundle install sqlite3
会解决这个问题。
+0
这提供了一个错误:捆绑安装需要被称为'捆绑安装[选项]' – Sprachprofi
答
我有同样的错误。
bundle update sqlite3
为我做了。
答
尝试,项目终端上:
bundle update sqlite3
bundle update nokogiri
这对我来说 我希望我已经帮你工作;)
它看起来像Windows机器,所以我戈纳说,这是刚刚开始的你的问题。通过切换到unix系统,你将为自己节省很多眼泪,目前ruby在Windows上的表现并不是很好。 – BroiSatse
好的,谢谢。所以我会切换到unix。 – Thomas