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がサポートしているsqlite3
versionの範囲で後方互換性を留められる。
gem versionによるエラーを避けられる。
- Railsを始めてsqlite3まわりのエラーで躓いている人たちへ