1

When running rails server, I load this warning:

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

Yet my gemfile has the gem

 group :development do
   gem 'sqlite3'

What is causing this error?

Using instructions for rails update from here https://edgeguides.rubyonrails.org/upgrading_ruby_on_rails.html#upgrading-from-rails-4-2-to-rails-5-0

GMarx
  • 473
  • 3
  • 13

3 Answers3

2

Deleted gem sqlite3 ( v 1.4.0 ) and installed it with version 1.3.13 & it worked

GMarx
  • 473
  • 3
  • 13
1
gem cleanup sqlite3

And

bundle install

to let Rails choose right version of sqlite3

William Tran
  • 269
  • 1
  • 4
1

Have the same problem in AWS cloud9 environment. You need to change your gemfile to read gem 'sqlite3', '~> 1.3.6' then run bundle update. got this from "can't activate sqlite3 (~> 1.3.6), already activated sqlite3-1.4.0"