Error “no such file to load” — sqlite3/sqlite3_native (LoadError)

前端 未结 5 1037
野的像风
野的像风 2020-12-06 17:37

My OS is Windows 7.

My problem is that when I try to run rails server, an error occurs. I have installed the sqlite3 gem, even the sq

相关标签:
5条回答
  • 2020-12-06 18:12

    Forget all the so called "answers", no compiling of the sources or downloading pre-compiled libraries will solve this problem, believe me I tried everything, the problem lies somewhere else. This is how it works on windows:

    bundle update sqlite3

    You likely get another similar error after this one regarding nokogiri, fix it with the command:

    bundle update nokogiri

    Enjoy your Ruby App!

    0 讨论(0)
  • 2020-12-06 18:17

    If you have extracted "exe"s and "dll"s from Sqlite download link to Ruby's bin folder and still have this problem. Try this:

    bundle update

    gem uninstall sqlite3

    Given a choice between multiple versions of sqlite3, choose last option 'All versions'. Enter last number here

    Select gem to uninstall:
    1. sqlite3-1.3.13
    2. sqlite3-1.3.13-x64-mingw32
    3. All versions
    >3 .
    .
    If you remove this gem, these dependencies will not be met.
    Continue with Uninstall? [yN]
    > y

    gem install sqlite3 --platform=ruby

    rails server

    This should work.

    Read through this link for more explanation if above works for you.

    0 讨论(0)
  • 2020-12-06 18:19

    Is that file (/sqlite3/sqlite3_native) in your PATH environment variable? It will need to be in order for that gem to work. If you need to check try using echo %PATH% on the command prompt. If it ends up that you need to add it to your path you can either SET PATH=%PATH%;C:\Path\To\Sqlite3 or change your environment variables by selecting the Properties\Advances\Environment Variables option after right-clicking on My Computer. Edit the path variable to contain your path and viola!

    0 讨论(0)
  • 2020-12-06 18:33

    download the required executable and the dll from http://www.sqlite.org/download.html extract to your ruby's bin (c:\Ruby192\bin)

    0 讨论(0)
  • 2020-12-06 18:34

    This URL provides the step-wise description and solution. Hope it works for you. http://rubyonwindowsguides.github.io/book/ch02-05.html

    0 讨论(0)
提交回复
热议问题