Specified sqlite3 for database adapter but gem is not loaded
<p>I'm new to Rails and was trying to launch my server. Running the command <code>rails server</code> generated an error</p>

<blockquote>
  <p>Specified 'sqlite3' for database adapter, but the gem is not loaded. Add <code>gem 'sqlite3'</code> to your Gemfile (and ensure its version is at the minimum required by ActiveRecord).</p>
</blockquote>

<p>I looked at many of these previous questions and none seems to solve it. Here is my Gemfile code</p>

<pre><code>if RUBY_VERSION =~ /1.9/
   Encoding.default_external = Encoding::UTF_8
   Encoding.default_internal = Encoding::UTF_8
end

source 'https://rubygems.org'

gem 'rails', '~&gt; 4.2.0'

gem 'ey_config'
gem 'rails_autolink'
gem 'simple_form'

# Assets
gem 'jquery-rails'
gem 'sass-rails'
gem 'coffee-rails'
gem 'uglifier'

platform :ruby do
   gem 'mysql2'
   gem 'pg'
   gem 'activerecord-postgis-adapter', '3.0.0.beta2'
   gem 'sqlite3'

   gem 'newrelic_rpm'
   gem 'unicorn'
   gem 'puma'
   gem 'json'
   gem 'minitest'
   gem 'psych'
   gem 'racc'
end

platforms :jruby do
   ar_jdbc_version = '~&gt; 1.3'
   gem 'activerecord-jdbc-adapter', ar_jdbc_version
   gem 'activerecord-jdbcmysql-adapter', ar_jdbc_version
   gem 'activerecord-jdbcpostgresql-adapter', ar_jdbc_version
   gem 'activerecord-jdbcsqlite3-adapter', ar_jdbc_version
   gem 'jdbc-mysql', :require =&gt; false
   gem 'jdbc-sqlite3', :require =&gt; false
   gem 'jdbc-postgres', :require =&gt; false

   gem 'jruby-openssl'
   gem 'trinidad'
end

platform :rbx do
   gem 'rubysl'
   gem 'rubysl-test-unit', :require =&gt; false
end

# Bundle gems for the local environment. Make sure to
# put test-only gems in this group so their generators
# and rake tasks are available in development mode:
group :development, :test do
   gem 'tzinfo-data'
end
</code></pre>

<p>And here is my database.yml file</p>

<pre><code># SQLite version 3.x
#   gem install sqlite3
development:
   adapter: sqlite3
   database: db/development.sqlite3
   pool: 5
   timeout: 5000

# Warning: The database defined as "test" will be erased and
# re-generated from your development database when you run "rake".
# Do not set this db to the same as development or production.
test:
   adapter: sqlite3
   database: db/test.sqlite3
   pool: 5
   timeout: 5000

production:
   adapter: sqlite3
   database: db/production.sqlite3
   pool: 5
   timeout: 5000`
</code></pre>

<p>Here is the code in my rakefile:</p>

<pre><code># Add your own tasks in files placed in lib/tasks ending in .rake,
# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.

require File.expand_path('../config/application', __FILE__)
require 'rake'

Listr::Application.load_tasks

task :travis =&gt; ['db:create:all', 'db:migrate', :default]
</code></pre>

<p>It will be also appreciated for providing any explanation accompanying the answer. Thanks.</p>