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

The dreaded sqlite3 issue...

I followed the tutorial on installing Ruby and Rails for Windows, and everything works up until the point when I try to go to http://localhost:3000. I've tried many of the fixes that others have specified, however, none of them work for me. Here's the message I get when trying to visit localhost:

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). Extracted source (around line #176): 174 175 176 177 178 179

        require path_to_adapter
      rescue Gem::LoadError => e
        raise Gem::LoadError, "Specified '#{spec[:adapter]}' for database adapter, but the gem is not loaded. Add `gem '#{e.name}'` to your Gemfile (and ensure its version is at the minimum required by ActiveRecord)."
      rescue LoadError => e
        raise LoadError, "Could not load '#{path_to_adapter}'. Make sure that the adapter in config/database.yml is valid. If you use an adapter other than 'mysql2', 'postgresql' or 'sqlite3' add the necessary adapter gem to the Gemfile.", e.backtrace
      end

1 Answer

Stacy Suits
seal-mask
.a{fill-rule:evenodd;}techdegree seal-36
Stacy Suits
Full Stack JavaScript Techdegree Graduate 24,223 Points

Try this: gem list sqlite3 to see what version of sqlite you have. Once you know that, in your Gemfile, enter it like this: gem 'sqlite3', '~> 1.3.13' inserting whatever version you have in the place of mine. I have two versions so had to put in the lowest version there for it to work.