title: Can't get my ruby on rails project to create a database
body: <p>This is probably a newbie setup problem. But here goes...</p>
  
  <p><strong>Machine setup</strong></p>
  
  <p>I have a Windows 7 64 bit machine running rails 4.0.0 and ruby 2.0.0
  I have the following in my Path </p>
  
  <pre><code>C:\Ruby200-x64\bin;C:\RubyDevKit\bin;C:\RubyDevKit\mingw\bin;
  </code></pre>
  
  <p><strong>Project setup</strong></p>
  
  <p>I am working from a cloned git project from a colleague's working repository.</p>
  
  <p>When I run my initial</p>
  
  <pre><code>rake db:migrate
  </code></pre>
  
  <p>I get the following error</p>
  
  <pre><code>rake aborted!
  Specified 'sqlite3' for database adapter, but the gem is not loaded. Add `gem 's
  qlite3'` to your Gemfile.
  C:/Working/mynewproject/config/environment.rb:5:in `&lt;top (required)&gt;'
  Tasks: TOP =&gt; db:migrate =&gt; environment
  (See full trace by running task with --trace)
  </code></pre>
  
  <p>My Gemfile does contain gem 'sqlite3' as follows</p>
  
  <pre><code># Use sqlite3 as the database for Active Record
  gem 'sqlite3' 
  </code></pre>
  
  <p>The complete Gemfile is</p>
  
  <pre><code>source 'https://rubygems.org'
  
  ruby '2.0.0'
  
  # Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
  gem 'rails', '4.0.0'
  gem 'rails_12factor', group: :production
  
  # Use sqlite3 as the database for Active Record
  gem 'sqlite3' 
  
  # Use SCSS for stylesheets
  gem 'sass-rails', '~&gt; 4.0.0'
  
  # Use Twitter Bootstrap for styling
  gem 'bootstrap-sass'
  
  # 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; 1.2'
  
  group :doc do
    # bundle exec rake doc:rails generates the API under doc/api.
    gem 'sdoc', require: false
  end
  
  # Use ActiveModel has_secure_password
  # gem 'bcrypt-ruby', '~&gt; 3.0.0'
  
  # Use unicorn as the app server
  # gem 'unicorn'
  
  # Use Capistrano for deployment
  # gem 'capistrano', group: :development
  
  # Use debugger
  # gem 'debugger', group: [:development, :test]
  
  gem 'protected_attributes' # should probably use strong parameters!
  </code></pre>
  
  <p>When I run <code>bundle install</code> I get the following list - note the absence of sqlite3</p>
  
  <pre><code>Using rake (10.1.0)
  Using i18n (0.6.5)
  Using minitest (4.7.5)
  Using multi_json (1.7.9)
  Using atomic (1.1.13)
  Using thread_safe (0.1.2)
  Using tzinfo (0.3.37)
  Using activesupport (4.0.0)
  Using builder (3.1.4)
  Using erubis (2.7.0)
  Using rack (1.5.2)
  Using rack-test (0.6.2)
  Using actionpack (4.0.0)
  Using mime-types (1.25)
  Using polyglot (0.3.3)
  Using treetop (1.4.15)
  Using mail (2.5.4)
  Using actionmailer (4.0.0)
  Using activemodel (4.0.0)
  Using activerecord-deprecated_finders (1.0.3)
  Using arel (4.0.0)
  Using activerecord (4.0.0)
  Using sass (3.2.10)
  Using bootstrap-sass (2.3.2.2)
  Using coffee-script-source (1.6.3)
  Using execjs (2.0.1)
  Using coffee-script (2.2.0)
  Using thor (0.18.1)
  Using railties (4.0.0)
  Using coffee-rails (4.0.0)
  Using hike (1.2.3)
  Using jbuilder (1.5.1)
  Using jquery-rails (3.0.4)
  Using json (1.8.0)
  Using protected_attributes (1.0.3)
  Using bundler (1.3.5)
  Using tilt (1.4.1)
  Using sprockets (2.10.0)
  Using sprockets-rails (2.0.0)
  Using rails (4.0.0)
  Using rails_serve_static_assets (0.0.1)
  Using rails_stdout_logging (0.0.2)
  Using rails_12factor (0.0.2)
  Using rdoc (3.12.2)
  Using sass-rails (4.0.0)
  Using sdoc (0.3.20)
  Using turbolinks (1.3.0)
  Using uglifier (2.2.1)
  Your bundle is complete!
  </code></pre>
  
  <p>When I do <code>bundle show 'sqlite3'</code> I get</p>
  
  <pre><code>Could not find gem 'sqlite3'.
  Did you mean sqlite3?
  </code></pre>
  
  <p>When I do <code>gem install 'sqlite3'</code> I get</p>
  
  <pre><code>Successfully installed sqlite3-1.3.8-x64-mingw32
  Parsing documentation for sqlite3-1.3.8-x64-mingw32
  unable to convert "\x90" from ASCII-8BIT to UTF-8 for lib/sqlite3/2.0/sqlite3_native.so, skipping
  1 gem installed
  </code></pre>
  
  <p>Having searched about to see about that "unable to convert" error, I found that I could install without documentation. So, if I do </p>
  
  <pre><code>gem install 'sqlite3' --no-doc 
  </code></pre>
  
  <p>I get</p>
  
  <pre><code>Successfully installed sqlite3-1.3.8-x64-mingw32
  1 gem installed
  </code></pre>
  
  <p>and then when I do </p>
  
  <pre><code>rake db:migrate
  </code></pre>
  
  <p>I still get </p>
  
  <pre><code>rake aborted!
  Specified 'sqlite3' for database adapter, but the gem is not loaded. Add `gem 's
  qlite3'` to your Gemfile.
  C:/Working/mynewproject/config/environment.rb:5:in `&lt;top (required)&gt;'
  Tasks: TOP =&gt; db:migrate =&gt; environment
  (See full trace by running task with --trace)
  </code></pre>
  
  <p>So, what have I missed? </p>
  
  <p>Thanks</p>
  
  <p><strong><em>Update after doing things suggested in the comments:</em></strong></p>
  
  <p>As a result of <a href="https://stackoverflow.com/users/406987/doon">Doon</a>'s comment I have put the gemfile contents in the description of the problem above</p>
  
  <p>In response to <a href="https://stackoverflow.com/users/1460496/techvineet">techvineet</a>'s comment I have ran <code>bundle install</code> several times with consistent outputs.</p>
  
  <p>As a result of <a href="https://stackoverflow.com/users/2291093/zrl3dx">zrl3dx</a>'s comment I have now ran <code>bundle exec bundle</code> and get the same output, i.e.</p>
  
  <pre><code>Using rake (10.1.0)
  Using i18n (0.6.5)
  Using minitest (4.7.5)
  Using multi_json (1.7.9)
  Using atomic (1.1.13)
  Using thread_safe (0.1.2)
  Using tzinfo (0.3.37)
  Using activesupport (4.0.0)
  Using builder (3.1.4)
  Using erubis (2.7.0)
  Using rack (1.5.2)
  Using rack-test (0.6.2)
  Using actionpack (4.0.0)
  Using mime-types (1.25)
  Using polyglot (0.3.3)
  Using treetop (1.4.15)
  Using mail (2.5.4)
  Using actionmailer (4.0.0)
  Using activemodel (4.0.0)
  Using activerecord-deprecated_finders (1.0.3)
  Using arel (4.0.0)
  Using activerecord (4.0.0)
  Using sass (3.2.10)
  Using bootstrap-sass (2.3.2.2)
  Using coffee-script-source (1.6.3)
  Using execjs (2.0.1)
  Using coffee-script (2.2.0)
  Using thor (0.18.1)
  Using railties (4.0.0)
  Using coffee-rails (4.0.0)
  Using hike (1.2.3)
  Using jbuilder (1.5.1)
  Using jquery-rails (3.0.4)
  Using json (1.8.0)
  Using protected_attributes (1.0.3)
  Using bundler (1.3.5)
  Using tilt (1.4.1)
  Using sprockets (2.10.0)
  Using sprockets-rails (2.0.0)
  Using rails (4.0.0)
  Using rails_serve_static_assets (0.0.1)
  Using rails_stdout_logging (0.0.2)
  Using rails_12factor (0.0.2)
  Using rdoc (3.12.2)
  Using sass-rails (4.0.0)
  Using sdoc (0.3.20)
  Using turbolinks (1.3.0)
  Using uglifier (2.2.1)
  Your bundle is complete!
  </code></pre>
  
  <p>As a result of <a href="https://stackoverflow.com/users/1262519/sachin-singh">Sachin Singh</a>'s comment I deleted Gemfile.lock and ran <code>bundle install</code>. The results were pretty much the same:</p>
  
  <pre><code>Fetching gem metadata from https://rubygems.org/..........
  Fetching gem metadata from https://rubygems.org/..
  Resolving dependencies...
  Using rake (10.1.0)
  Using i18n (0.6.5)
  Using minitest (4.7.5)
  Using multi_json (1.7.9)
  Using atomic (1.1.13)
  Using thread_safe (0.1.2)
  Using tzinfo (0.3.37)
  Using activesupport (4.0.0)
  Using builder (3.1.4)
  Using erubis (2.7.0)
  Using rack (1.5.2)
  Using rack-test (0.6.2)
  Using actionpack (4.0.0)
  Using mime-types (1.25)
  Using polyglot (0.3.3)
  Using treetop (1.4.15)
  Using mail (2.5.4)
  Using actionmailer (4.0.0)
  Using activemodel (4.0.0)
  Using activerecord-deprecated_finders (1.0.3)
  Using arel (4.0.0)
  Using activerecord (4.0.0)
  Using sass (3.2.10)
  Using bootstrap-sass (2.3.2.2)
  Using bundler (1.3.5)
  Using coffee-script-source (1.6.3)
  Using execjs (2.0.1)
  Using coffee-script (2.2.0)
  Using thor (0.18.1)
  Using railties (4.0.0)
  Using coffee-rails (4.0.0)
  Using hike (1.2.3)
  Using jbuilder (1.5.1)
  Using jquery-rails (3.0.4)
  Using json (1.8.0)
  Using protected_attributes (1.0.3)
  Using tilt (1.4.1)
  Using sprockets (2.10.0)
  Using sprockets-rails (2.0.0)
  Using rails (4.0.0)
  Using rails_serve_static_assets (0.0.1)
  Using rails_stdout_logging (0.0.2)
  Using rails_12factor (0.0.2)
  Using rdoc (3.12.2)
  Using sass-rails (4.0.0)
  Using sdoc (0.3.20)
  Using turbolinks (1.3.0)
  Using uglifier (2.2.1)
  Your bundle is complete!
  Use `bundle show [gemname]` to see where a bundled gem is installed.
  </code></pre>
  
  <p>so still no mention of sqlite3 and <code>rake db:migrate</code> still results in</p>
  
  <pre><code>rake aborted!
  Specified 'sqlite3' for database adapter, but the gem is not loaded. Add `gem 's
  qlite3'` to your Gemfile.
  C:/Working/its-a-disaster/config/environment.rb:5:in `&lt;top (required)&gt;'
  Tasks: TOP =&gt; db:migrate =&gt; environment
  (See full trace by running task with --trace)
  </code></pre>
  
  <p>In response to <a href="https://stackoverflow.com/users/1262519/sachin-singh">Sachin Singh</a>'s question what is the output of <code>ruby -v command</code>?</p>
  
  <p>It says:</p>
  
  <pre><code>ruby 2.0.0p247 (2013-06-27) [x64-mingw32]
  </code></pre>
  
  <p>and rails --version says</p>
  
  <pre><code>Rails 4.0.0
  </code></pre>
  
  <p><a href="https://stackoverflow.com/users/663028/prusswan">Prusswan</a> asked are there other ruby installations on the same machine?</p>
  
  <p>There were three - 1.9.2, 1.9.3 and 2.0.0
  The latter is the one in the path. 
  The other two I have since removed. </p>