4

每当我尝试安装 gem 时:

gem install sqlite3-ruby

我得到以下输出:

D:/Ruby/bin/ruby.exe extconf.rb
checking for sqlite3.h... no
sqlite3.h 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
--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=D:/Ruby/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

我已经在我的 Windows 上正确安装了 sqlite3:

D:\>sqlite3
SQLite version 3.7.16.2 2013-04-12 11:52:43
Enter ".help" for instructions
Enter SQL statements terminated with a ";"
sqlite>

这是我的第二次安装尝试,我再次收到相同的错误消息。

4

3 回答 3

1

问题是我使用的是 ruby​​ 2.x(目前是 beta 版,不能使用 sqlite3)而不是 1.9.3。

于 2013-06-27T22:48:20.497 回答
0

您需要先安装 SQLite,以便获得 ruby​​ gem 工作所需的开发头文件。

转到http://mislav.uniqpath.com/rails/install-sqlite3/#windows,然后按照说明进行操作。然后gem安装应该成功。

于 2013-05-12T12:45:49.110 回答
-1

显然,您的错误消息显示“首先安装 SQLite3 ...”。

尝试:

gem install sqlite3

如果这解决了您的问题,请随时通知我。

于 2013-05-11T21:02:57.100 回答