LoginSignup
0
0

More than 3 years have passed since last update.

rails new ~ でLoadError: cannot load such file -- sqlite3/2.7/sqlite3_nativeのエラーが出る時の解決

Last updated at Posted at 2021-04-28

環境

Windows10
Ruby+Devkit 2.7.3-1(x64)
rails 6

生じた問題

「rails new アプリ名」でアプリを作成した際に「LoadError: cannot load such file - sqlite3/2.7/sqlite3_native」というエラーがでてきました。

LoadError: 126: 指定されたモジュールが見つかりません。   -C:/Ruby27-x64/lib/・・・

<中略>

Caused by:
LoadError: cannot load such file -- sqlite3/2.7/sqlite3_native

解決策

原因はsqlite3のバージョンがRubyのバージョンに対応していないことだったらしいです。
以下の手順で解決しました!

$ gem uninstall -a sqlite3
$ gem install sqlite3 --platform=ruby

参考記事

sqlite3起因でrails server失敗した場合

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0