Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Ruby Ruby on Rails 5 Basics Creating an App Creating a Rails App

Getting Sqlite Error after entering "bin/rails server"

I am on windows, using the Ubuntu command prompt. After entering "bin/rails server", I get the following error: #<LoadError: Error loading the 'sqlite3' Active Record adapter. Missing a gem it depends on? can't activate sqlite3.

Any ideas on how to fix this?

742 Points

I had a similar problem, though not exactly the same (am on MacOS). My server would boot up, but trying to load a page would result in:

Gem::LoadError (Specified 'sqlite3' for database adapter, but the gem is not loaded. Addgem 'sqlite3'to your Gemfile (and ensure its version is at the minimum required by ActiveRecord).):

This reddit post helped me:

There was a recent sqlite3 1.4.0 release which broke current Rails 5.2, which enforces 1.3.x.


In my case, the following steps worked:

  1. Replace gem 'sqlite3' with gem 'sqlite3', '~> 1.3.0 ' in your Gemfile
  2. Remove Gemfile.lock
  3. Run bundle install again

1 Answer

Thanks obi, managed to get this one straightened out.