lundi 29 décembre 2014

Installing the SQLite3 gem on Windows: sqlite.h is found, sqlite itself is not

I've googled the fuck out of this issue, but over two hours, literally every post I found was about people failing to find sqlite.h, while my error is about sqlite itself.


I've installed Ruby 2.1 using the RubyInstaller, and I've set up the devkit, which is in my PATH. Other gems with native extensions, like json, work totally fine, and compile normally.


I downloaded the SQLite amalgamation and source code, put it in c:\sqlite3, and added that to my PATH. I now attempt to run gem install sqlite3 --platform=ruby -- --with-sqlite3-dir=C:/sqlite3 --with-sqlite3-include=C:/sqlite3. This fails with the error



checking for sqlite3.h... yes
checking for sqlite3_libversion_number() in -lsqlite3... no
sqlite3 is missing. Install SQLite3 from http://www.sqlite.org/ first.


* extconf.rb failed *


sqlite3.exe is downloaded and in my PATH, and I can use SQLite databases from the command prompt just fine. I don't know what else the gem could possibly want from me -- SQLite3.h is there, SQLite is there, it works. No instructions and no StackOverflow posts mention this error, anything else I could do, or extra steps.


Aucun commentaire:

Enregistrer un commentaire