Solving `Error loading 'sqlite3' Active Record adapter`

If you’re trying to build a new Rails project and you’re getting the error, Puma caught this error: Error loading the ‘sqlite3’ Active Record adapter. Missing a gem it depends on? can’t activate sqlite3 (~> 1.3.6), already activated sqlite3-1.4.0. Make sure all dependencies are added to Gemfile. (LoadError) or No connection pool with ‘primary’ found., you’ll need to go to your Gemfile and change…

gem 'sqlite3'

…to…

gem 'sqlite3', '~> 1.3.6'

Then, run bundle install and restart your Rails server.

This happened to me when I was starting a new project with rails new. Luckily, the error is pretty self-explanatory. Have fun building.

About the author

I'm Mark Thomas Miller, a full stack engineer and designer currently working at ConvertKit. (We're hiring!) People like Arnold Schwarzenegger, Lindsey Stirling, and Tim Ferriss use features I've built to connect with their fans. I'm currently geeking out about Svelte, mechanical keyboards, and minimalist UI design, and replaying Ocarina of Time.