title: Unable to Install dm-sqlite-adapter Gem on Windows PC
body: <p>I am new to Ruby/Sinatra and I am trying to install the DataMapper SQLite Adapter. When I run <code>gem install dm-sqlite-adapter</code> I get the message below.  I did previously install sqlite3 using the command <code>gem install sqlite3</code>.  However, if I try to call <code>gem install sqlite3 --platform=ruby</code>, I get errors.</p>
  
  <blockquote>
  <pre><code>  c:\Ruby_Dev_Kit&gt;gem install dm-sqlite-adapter
  Temporarily enhancing PATH to include DevKit...
  Building native extensions.  This could take a while...
  ERROR:  Error installing dm-sqlite-adapter:
          ERROR: Failed to build gem native extension.
  
      C:/Ruby200-x64/bin/ruby.exe extconf.rb
  checking for sqlite3.h... no
  *** 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
          --without-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}/
  
  
  Gem files will remain installed in C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/do_sq
  lite3-0.10.13 for inspection.
  Results logged to C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/do_sqlite3-0.10.13/ext
  /do_sqlite3/gem_make.out
  </code></pre>
  </blockquote>
  
  <p>I have tried multiple different approaches to get around this issue. I was able to install the Ruby Development Kit as I was able to install the JSON gem.  Similarly I downloaded the SQLite source code from <a href="http://sqlite.org/" rel="nofollow">SQLite.org</a> but I was not able to figure out how to properly configure all aspects of the amalgamation to be found by the tool.  Below is the <code>mkmf.log</code>'s value:</p>
  
  <pre><code>have_header: checking for sqlite3.h... -------------------- no
  
  "x86_64-w64-mingw32-gcc -o conftest.exe -IC:/Ruby200-x64/include/ruby-2.0.0/x64-mingw32 -IC:/Ruby200-x64/include/ruby-2.0.0/ruby/backward -IC:/Ruby200-x64/include/ruby-2.0.0 -I. -I/usr/local/include -I/opt/local/include -I/usr/include -DFD_SETSIZE=2048 -D_WIN32_WINNT=0x0501 -D_FILE_OFFSET_BITS=64   -O3 -fno-omit-frame-pointer -fno-fast-math -g -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wunused-variable -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wimplicit-function-declaration -Wall  -DHAVE_NO_DATETIME_NEWBANG conftest.c  -L. -LC:/Ruby200-x64/lib -L/usr/local/ -L/opt/local/ -L/usr/ -L.      -lx64-msvcrt-ruby200  -lshell32 -lws2_32 -limagehlp -lshlwapi  "
  checked program was:
  /* begin */
  1: #include "ruby.h"
  2: 
  3: #include &lt;winsock2.h&gt;
  4: #include &lt;windows.h&gt;
  5: int main(int argc, char **argv)
  6: {
  7:   return 0;
  8: }
  /* end */
  
  "x86_64-w64-mingw32-gcc -E -IC:/Ruby200-x64/include/ruby-2.0.0/x64-mingw32 -IC:/Ruby200-x64/include/ruby-2.0.0/ruby/backward -IC:/Ruby200-x64/include/ruby-2.0.0 -I. -I/usr/local/include -I/opt/local/include -I/usr/include -DFD_SETSIZE=2048 -D_WIN32_WINNT=0x0501 -D_FILE_OFFSET_BITS=64   -O3 -fno-omit-frame-pointer -fno-fast-math -g -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wunused-variable -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wimplicit-function-declaration -Wall  -DHAVE_NO_DATETIME_NEWBANG  conftest.c -o conftest.i"
  conftest.c:5:21: fatal error: sqlite3.h: No such file or directory
  compilation terminated.
  checked program was:
  /* begin */
  1: #include "ruby.h"
  2: 
  3: #include &lt;winsock2.h&gt;
  4: #include &lt;windows.h&gt;
  5: #include &lt;sqlite3.h&gt;
  /* end */
  
  --------------------
  </code></pre>
  
  <p>I tried many different things to get it working, and I realize this may be a stupid question. However, at this point, I am out of ideas.  Any assistance would be really appreciated.</p>
  
  <p><strong>System Information:</strong></p>
  
  <ul>
  <li>Windows 7 64 bit</li>
  <li>Ruby Version: 2.0.0 p247 x64</li>
  <li>Installer - Standard Ruby Exe Installer</li>
  </ul>