railsでsqlite3のversionエラーで正常に動作しない件について
AWSの勉強をしていたところ、 rails sを実行するも下記エラーが発生した。 解決方法が判明したのでシェア。
★エラー名
Specified 'sqlite3' for database adapter, but the gem is not loaded. Add gem 'sqlite3'
to your Gemfile (and ensure its version is at the minimum required by ActiveRecord). (Gem::LoadError)
★解決方法
GemFileを開く.
以下のように修正する.
変更前 gem 'sqlite3'
変更後 gem 'sqlite3', '~>1.3.0'
★原因
Rails 5.0.7.2 では sqlite3 のバージョン 1.4 系に対応していないといったところが原因の模様。