1
2

More than 5 years have passed since last update.

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. (Gem::LoadError)

Last updated at Posted at 2019-02-26

bin/rails g ... する際に sqlite3 のversion依存関係で怒られたので解決法を調べた。

解決方法

Gemfile.
- gem 'sqlite3'
+ gem 'sqlite3', '~> 1.3.6'
$ bundle install

原因

リンク先に詳細が記載されている。
簡潔にいうと、Railsの指定しているsqlite3のversionは1.3.x
一方で、sqlite3自体の最新versionは1.4.x
上記の後方互換性の指定'~> 1.3.6'1.4.0未満を指定しているので、
Railsがサポートしているsqlite3versionの範囲で後方互換性を留められる。
gem versionによるエラーを避けられる。
- Railsを始めてsqlite3まわりのエラーで躓いている人たちへ

rails自体の修正

>=の意味

1
2
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
1
2