Ruby Rails: sqlite3 on Windows x64

Ruby 2.1 64-bit for Windows have problem with sqlite3 gem install where it can’t find the native library. You would get an “unable to find sqlite3_native.so” or “checking for sqlite3_libversion_number() in -lsqlite3… no”. To fix this:

  1. Download source file from sqlite.org and unzip to a directory. Eg. C:\sqlite3
  2. Download the 64-bit dll from here and replace the unzipped dll with this.
  3. Now run gem install sqlite3 --platform=ruby -- --with-sqlite3-dir=C:\sqlite3 --with-sqlite3-include=C:\sqlite3 --with-sqlite3-lib=C:\sqlite3

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.