title: Rails 4.0rc1 app not running due to missing sqlite3 gem
body: <p>First time I've tried installing Rails 4.0. On Windows 8 with Ruby 2.0 x64. Ran:</p>
  
  <pre><code>gem install rails --version 4.0.0.rc1 --no-ri --no-rdoc
  </code></pre>
  
  <p>Then I run:</p>
  
  <pre><code>rails new test_app
  cd test_app
  rails s
  </code></pre>
  
  <p>But the webpage at <code>localhost:3000</code> reports the following error:</p>
  
  <blockquote>
    <p>Specified 'sqlite3' for database adapter, but the gem is not loaded.
    Add <code>gem 'sqlite3'</code> to your Gemfile.</p>
  </blockquote>
  
  <p>It's there in my Gemfile:</p>
  
  <pre><code>gem 'sqlite3'
  </code></pre>
  
  <p>I tried running <code>bundle install</code> several times and it doesn't even list it among all the other gems.</p>
  
  <p><em><strong>UPDATE</em></strong>: I've tried installing the sqlite3 gem in 2 different ways, both using the terminal that opens from the msys.bat file from the DevKit. The way the @szines below mentions gives me the following error:</p>
  
  <pre><code>$ gem install sqlite3 --platform=ruby -- --with-opt-dir=c:/sqlite-amalgamation-3071602
  Temporarily enhancing PATH to include DevKit...
  Building native extensions with: '--with-opt-dir=c:/sqlite-amalgamation-3071602'
  This could take a while...
  ERROR:  Error installing sqlite3:
          ERROR: Failed to build gem native extension.
  
      c:/Ruby200-x64/bin/ruby.exe extconf.rb --with-opt-dir=c:/sqlite-amalgamation-3071602
  checking for sqlite3.h... yes
  checking for sqlite3_libversion_number()... -lsqlite3
  sqlite3 is missing. Install SQLite3 from http://www.sqlite.org/ first.
  *** extconf.rb failed ***
  Could not create Makefile due to some reason, probably lack of necessary
  libraries and/or headers.  Check the mkmf.log file for more details.  You may
  need configuration options.
  
  Provided configuration options:
          --with-opt-dir
          --with-opt-include
          --without-opt-include=${opt-dir}/include
          --with-opt-lib
          --without-opt-lib=${opt-dir}/lib
          --with-make-prog
          --without-make-prog
          --srcdir=.
          --curdir
          --ruby=c:/Ruby200-x64/bin/ruby
          --with-sqlite3-dir
          --without-sqlite3-dir
          --with-sqlite3-include
          --without-sqlite3-include=${sqlite3-dir}/include
          --with-sqlite3-lib
          --without-sqlite3-lib=${sqlite3-dir}/
          --enable-local
          --disable-local
          --with-sqlite3lib
          --without-sqlite3lib
  
  
  Gem files will remain installed in c:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/sqlite3-1.3.7 for inspection.
  Results logged to c:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/sqlite3-1.3.7/ext/sqlite3/gem_make.out
  </code></pre>
  
  <p>The other way, I use the autoconf package from sqlite.org and I am able to compile and install the sqlite3 gem. However, when I try to open the Rails server I get the following error:</p>
  
  <pre><code>C:\Users\me\RubymineProjects\my_project&gt;rails s
  C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/sqlite3-1.3.7/lib/sqlite3.rb:6:in `require': cannot load such file -- sqlite3/sqlite3_native (LoadError)
          from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/sqlite3-1.3.7/lib/sqlite3.rb:6:in `rescue in &lt;top (required)&gt;'
          from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/sqlite3-1.3.7/lib/sqlite3.rb:2:in `&lt;top (required)&gt;'
          from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/bundler-1.3.5/lib/bundler/runtime.rb:72:in `require'
          from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/bundler-1.3.5/lib/bundler/runtime.rb:72:in `block (2 levels) in require'
          from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/bundler-1.3.5/lib/bundler/runtime.rb:70:in `each'
          from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/bundler-1.3.5/lib/bundler/runtime.rb:70:in `block in require'
          from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/bundler-1.3.5/lib/bundler/runtime.rb:59:in `each'
          from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/bundler-1.3.5/lib/bundler/runtime.rb:59:in `require'
          from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/bundler-1.3.5/lib/bundler.rb:132:in `require'
          from C:/Users/me/RubymineProjects/my_project/config/application.rb:7:in `&lt;top (required)&gt;'
          from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/railties-4.0.0.rc1/lib/rails/commands.rb:78:in `require'
          from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/railties-4.0.0.rc1/lib/rails/commands.rb:78:in `block in &lt;top (required)&gt;'
          from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/railties-4.0.0.rc1/lib/rails/commands.rb:75:in `tap'
          from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/railties-4.0.0.rc1/lib/rails/commands.rb:75:in `&lt;top (required)&gt;'
          from bin/rails:4:in `require'
          from bin/rails:4:in `&lt;main&gt;'
  </code></pre>