Search code examples
ruby-on-railssqliterails-4-upgrade

Updating Rails 4.2 to 5.0.0 & sqlite3 gem will not load


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


Solution

  • gem cleanup sqlite3
    

    And

    bundle install
    

    to let Rails choose right version of sqlite3