can't activate sqlite3 (~> 1.3.6), already activated sqlite3-1.4.0 can't activate sqlite3 (~> 1.3.6), already activated sqlite3-1.4.0 sqlite sqlite

can't activate sqlite3 (~> 1.3.6), already activated sqlite3-1.4.0


I had a similar issue today. Here's what worked for me. I tried using Michael's approach but received a similar error.

So instead, I removed the gem that I thought was giving me an error, by gem uninstall sqlite3 -v 1.4.0

and instead, used in my gem file. gem 'sqlite3', '~> 1.3.6'Ran the bundle update and it worked like a charm for me.


I solved this error configuring the version of sqlite3 in the Gemfile like this:

gem 'sqlite3', '~> 1.3', '< 1.4'

It seemed that sqlite3-1.3.6 is not working fine and the sqlite3-1.4 is not supported yet, so it(the line I suggest to correct for this problem) will download the latest 1.3 version. In my case it is the sqlite3-1.3.11.

I am using rails-5.0.0 and ruby-2.5.1 in my project.


The problem is caused by Active Record which has version constraint on sqlite3 gem. For example, in case of Rails 5.2.2 (latest stable release at the time I am writing this response) it is ~> 1.3.6. However, this constraint is not specified in gemspec, but in a source file which contains the adapter class. As a consequence, Bundler is unaware of it, and installs sqlite3 gem version 1.4.0, which is conflicting.

The good news is that fix has been already merged into master and Rails 5.2 maintenance branches (and possibly other ones), and should be included in 5.2.3.

For now, you can do one of following:

  • Add sqlite3 constraint to your Gemfile: gem 'sqlite3', '~> 1.3.6'
  • Install Active Record from a branch named 5-2-stable.