cannot load such file — sqlite3/sqlite3_native (LoadError) on ruby on rails

后端 未结 18 2022
遇见更好的自我
遇见更好的自我 2020-11-22 09:39

When I try to setup basic installation and initiation of server using Rails 4.0.0 on Ruby 2.0.0, I\'m facing the following error message.

/usr/local/lib/ruby         


        
18条回答
  •  礼貌的吻别
    2020-11-22 09:52

    To avoid this error, ensure that gem sqlite3 is added to your Gemfile. Then extract "exe"s and "dll"s from Sqlite download link to Ruby's bin folder. If problem still persists. 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 s

    This should work.

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

提交回复
热议问题