Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Error loading the 'sqlite3' Active Record adapter. #26

Open
igaiga opened this issue Feb 16, 2019 · 4 comments
Open

Error loading the 'sqlite3' Active Record adapter. #26

igaiga opened this issue Feb 16, 2019 · 4 comments

Comments

@igaiga
Copy link

igaiga commented Feb 16, 2019

現象

/Users/igaiga/.rbenv/versions/2.6.1/lib/ruby/2.6.0/bundler/rubygems_integration.rb:408:in `block (2 levels) in replace_gem': Error loading the 'sqlite3' Active Record adapter. Missing a gem it depends on? can't activate sqlite3 (~> 1.3.6), already activated sqlite3-1.4.0. Make sure all dependencies are added to Gemfile. (LoadError)

上記のエラーがrails s後にアクセスする際に発生する

発生する環境

  • Rails5.2.2
  • Ruby2.6.1
  • sqlite3 v.1.4.0

解決方法

Gemfileで以下の変更を入れる。

gem 'sqlite3'

gem "sqlite3", "< 1.4"

参考にしたコード(Railsの5-2-stableブランチで今後入るコードに揃えた)

rails/rails@6d5f251

@naoty
Copy link

naoty commented Feb 16, 2019

手元で試してみたんですが、rails newしたときにsqlite31.4.0がインストールされるので、

gem "sqlite3", "~> 1.3", ">= 1.3.6"

と書き換えてbundle updateしても、1.4.0"~> 1.3", ">= 1.3.6"を満たしているので、1.3.xにdowngradeされないんじゃないかな〜と思いました。

エラーメッセージにあるように

gem "sqlite3", "~> 1.3.6"

でどうでしょう?

@igaiga
Copy link
Author

igaiga commented Feb 16, 2019

(゚◇゚)ガーン
では、naotyさん案で!
descriptionも書き換えておきました。

@igaiga
Copy link
Author

igaiga commented Feb 22, 2019

松田さんより < 1.4 が分かりやすかろうという案がでて、その通りだと思うのでdescription置き換えました。 @naoty さん動作確認感謝です。m(_ _)m

@pmpinto
Copy link

pmpinto commented Mar 24, 2023

@igaiga I'm very glad this repo is public 🙏

I don't speak (nor read) Japanese but I was struggling with this error since yesterday. Today I found this issue and decided to translate it, and it was totally worth it!

Very much appreciated! 🙇

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants