I'm a complete beginner to Rails, and I've been following a tutorial. I got stuck when it said to type "rails server" in the blog directory. It states, "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)."

I got ruby 2.4.4, rails 4.2.10, sqlite3 (1.4.1, 1.4.0)

I've already seen a few questions about the same problem, but the solutions didn't work for me.

I've tried : -gem install sqlite3 -gem list sqlite3 -bundle add sqlite3

Some people were talking about modifying the Gemfile.lock, changing "sqlite3 (1.4.1)" to "sqlite3 (1.4.1-x64-mingw32)". I've also tried this, but it didn't work

1 Answers

sk1712 On Best Solutions

Try following steps

  1. Uninstall gem using gem uninstall sqlite3

  2. Add following line into your Gemfile

    gem 'sqlite3', git: "https://github.com/larskanis/sqlite3-ruby", branch: "add-gemspec"
  3. bundle install

This will fix your problem.