title: Rails on windows error: Could not load 'active_record/connection_adapters/sqlite3_adapter'
body: <p>I had the exact problem as in <a href="https://stackoverflow.com/questions/17643897/cannot-load-such-file-sqlite3-sqlite3-native-loaderror-on-ruby-on-rails">this</a> question. And I followed the steps as given in the accepted answers. It worked as expected. But unexpectedly I am getting this error on running the app:</p>
  <pre><code>Could not load 'active_record/connection_adapters/sqlite3_adapter'. Make sure that the adapter in config/database.yml is valid. If you use an adapter other than 'mysql', 'mysql2', 'postgresql' or 'sqlite3' add the necessary adapter gem to the Gemfile.
  </code></pre>
  <p>I am also attaching the screenshot.
  <img src="https://i.stack.imgur.com/v41fx.png" alt="Error Screenshot" /></p>
  <p>My gemfile has the required dependencies(sqlite3):</p>
  <pre><code>source 'https://rubygems.org'
  
  
  # Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
  gem 'rails', '4.1.6'
  # Use sqlite3 as the database for Active Record
  gem 'sqlite3'
  # Use SCSS for stylesheets
  gem 'sass-rails', '~&gt; 4.0.3'
  # Use Uglifier as compressor for JavaScript assets
  gem 'uglifier', '&gt;= 1.3.0'
  # Use CoffeeScript for .js.coffee assets and views
  gem 'coffee-rails', '~&gt; 4.0.0'
  # See https://github.com/sstephenson/execjs#readme for more supported runtimes
  # gem 'therubyracer',  platforms: :ruby
  
  # Use jquery as the JavaScript library
  gem 'jquery-rails'
  # Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks
  gem 'turbolinks'
  # Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
  gem 'jbuilder', '~&gt; 2.0'
  # bundle exec rake doc:rails generates the API under doc/api.
  gem 'sdoc', '~&gt; 0.4.0',          group: :doc
  
  # Use ActiveModel has_secure_password
  # gem 'bcrypt', '~&gt; 3.1.7'
  
  # Use unicorn as the app server
  # gem 'unicorn'
  
  # Use Capistrano for deployment
  # gem 'capistrano-rails', group: :development
  
  # Use debugger
  # gem 'debugger', group: [:development, :test]
  
  # Windows does not include zoneinfo files, so bundle the tzinfo-data gem
  gem 'tzinfo-data', platforms: [:mingw, :mswin]
  </code></pre>
  <p>And also my database.yml has the needed adapter(sqlite3):</p>
  <pre><code># SQLite version 3.x
  #   gem install sqlite3
  #
  #   Ensure the SQLite 3 gem is defined in your Gemfile
  #   gem 'sqlite3'
  #
  default: &amp;default
    adapter: sqlite3
    pool: 5
    timeout: 5000
  
  development:
    &lt;&lt;: *default
    database: db/development.sqlite3
  
  # Warning: The database defined as &quot;test&quot; will be erased and
  # re-generated from your development database when you run &quot;rake&quot;.
  # Do not set this db to the same as development or production.
  test:
    &lt;&lt;: *default
    database: db/test.sqlite3
  
  production:
    &lt;&lt;: *default
    database: db/production.sqlite3
  </code></pre>
  <p>So what is wrong here?
  My Ruby version is 4.1.6 and I have installed rails using <code>gem install rails</code> command. So it must be the latest one.</p>