sqlite3无法捆绑在Windows Rails应用中

时间:2019-02-27 09:21:57

标签: ruby-on-rails ruby windows sqlite

当前目录: C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/sqlite3-1.4.0/ext/sqlite3 C:/Ruby26-x64/bin/ruby.exe -I C:/Ruby26-x64/lib/ruby/2.6.0 -r ./siteconf20190227-5688-2rzd4d.rb extconf.rb 正在检查sqlite3.h ...否 sqlite3.h丢失。首先从http://www.sqlite.org/安装SQLite3。 * extconf.rb失败* 由于某些原因(可能缺少必要)而无法创建Makefile 库和/或标题。检查mkmf.log文件以获取更多详细信息。你可以 需要配置选项。

提供的配置选项:         --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         --with-make-prog         --srcdir =。         --curdir         --ruby = C:/ Ruby26-x64 / bin / $(RUBY_BASE_NAME)         --with-sqlcipher         --without-sqlcipher         --with-sqlite3-config         --without-sqlite3-config         --with-pkg-config         --without-pkg-config         --with-sqlcipher         --without-sqlcipher         --with-sqlite3-dir         --without-sqlite3-dir         --with-sqlite3-include         --without-sqlite3-include = $ {sqlite3-dir} / include         --with-sqlite3-lib         --without-sqlite3-lib = $ {sqlite3-dir} / lib

要查看此扩展为何无法编译,请检查mkmf.log,该文件可以 在这里找到:

C:/Ruby26-x64/lib/ruby/gems/2.6.0/extensions/x64-mingw32/2.6.0/sqlite3-1.4.0/mkmf.log

extconf失败,退出代码1

宝石文件将继续安装在 C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/sqlite3-1.4.0进行检查。 结果记录到 C:/Ruby26-x64/lib/ruby/gems/2.6.0/extensions/x64-mingw32/2.6.0/sqlite3-1.4.0/gem_make.out

在安装sqlite3(1.4.0)时发生错误,并且Bundler无法继续。 确保gem install sqlite3 -v '1.4.0' --source 'https://rubygems.org/' 捆绑前成功。

在Gemfile中:   sqlite3

C:\ Users \ User \ blog> gem install sqlite3 -v'1.4.0'--source'https://rubygems.org 暂时增强MSYS / MINGW的PATH ... 安装所需的msys2软件包:mingw-w64-x86_64-sqlite3 构建本机扩展。这可能需要一段时间... 错误:安装sqlite3时出错:         错误:无法构建gem本机扩展。

current directory: C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/sqlite3-1.4.0/ext/sqlite3

C:/Ruby26-x64/bin/ruby.exe -I C:/Ruby26-x64/lib/ruby/2.6.0 -r ./siteconf20190227-8976-1h69dwp.rb extconf.rb 正在检查sqlite3.h ...是 检查-lpthread中的pthread_create()...是 正在检查-ldl ...否 检查dlopen()...否 缺少函数dlopen * extconf.rb失败* 由于某些原因(可能缺少必要)而无法创建Makefile 库和/或标题。检查mkmf.log文件以获取更多详细信息。你可以 需要配置选项。

提供的配置选项:         --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         --with-make-prog         --srcdir =。         --curdir         --ruby = C:/ Ruby26-x64 / bin / $(RUBY_BASE_NAME)         --with-sqlcipher         --without-sqlcipher         --with-sqlite3-config         --without-sqlite3-config         --with-pkg-config         --without-pkg-config         --with-sqlcipher         --without-sqlcipher         --with-sqlite3-dir         --without-sqlite3-dir         --with-sqlite3-include         --without-sqlite3-include = $ {sqlite3-dir} / include         --with-sqlite3-lib         --without-sqlite3-lib = $ {sqlite3-dir} / lib         --with-pthreadlib         --without-pthreadlib         --with-dllib         --without-dllib

要查看此扩展为何无法编译,请检查mkmf.log,该文件可在此处找到:

C:/Ruby26-x64/lib/ruby/gems/2.6.0/extensions/x64-mingw32/2.6.0/sqlite3-1.4.0/mkmf.log

extconf失败,退出代码1

宝石文件将保持安装在C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/sqlite3-1.4.0中进行检查。 结果记录到C:/Ruby26-x64/lib/ruby/gems/2.6.0/extensions/x64-mingw32/2.6.0/sqlite3-1.4.0/gem_make.out

C:\ Users \ User \ blog> gem unlink sqlite 错误:执行gem时...(Gem :: CommandLineError)     未知命令取消链接

C:\ Users \ User \ blog> gem安装sqlite3-通用 错误:执行gem时(OptionParser :: InvalidOption)     无效选项:--universal

C:\ Users \ User \ blog> gem安装sqlite3---with-sqlite3-dir = / usr / local / Cellar / sqlite / 3.8.8.1 暂时增强MSYS / MINGW的PATH ... 安装所需的msys2软件包:mingw-w64-x86_64-sqlite3 警告:mingw-w64-x86_64-sqlite3-3.26.0-1是最新的-跳过 使用以下命令构建本机扩展:'--with-sqlite3-dir = / usr / local / Cellar / sqlite / 3.8.8.1' 这可能需要一段时间... 错误:安装sqlite3时出错:         错误:无法构建gem本机扩展。

current directory: C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/sqlite3-1.4.0/ext/sqlite3

C:/Ruby26-x64/bin/ruby.exe -IC:/Ruby26-x64/lib/ruby/2.6.0 -r ./siteconf20190227-13444-5xb02v.rb extconf.rb --with-sqlite3- dir \ = / usr / local / Cellar / sqlite / 3.8.8.1 正在检查sqlite3.h ...是 检查-lpthread中的pthread_create()...是 正在检查-ldl ...否 检查dlopen()...否 缺少函数dlopen * extconf.rb失败* 由于某些原因(可能缺少必要)而无法创建Makefile 库和/或标题。检查mkmf.log文件以获取更多详细信息。你可以 需要配置选项。

提供的配置选项:         --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         --with-make-prog         --srcdir =。         --curdir         --ruby = C:/ Ruby26-x64 / bin / $(RUBY_BASE_NAME)         --with-sqlcipher         --without-sqlcipher         --with-sqlite3-config         --without-sqlite3-config         --with-pkg-config         --without-pkg-config         --with-sqlcipher         --without-sqlcipher         --with-sqlite3-dir         --with-sqlite3-include         --without-sqlite3-include = $ {sqlite3-dir} / include         --with-sqlite3-lib         --without-sqlite3-lib = $ {sqlite3-dir} / lib         --with-pthreadlib         --without-pthreadlib         --with-dllib         --without-dllib

要查看此扩展为何无法编译,请检查mkmf.log,该文件可在此处找到:

C:/Ruby26-x64/lib/ruby/gems/2.6.0/extensions/x64-mingw32/2.6.0/sqlite3-1.4.0/mkmf.log

extconf失败,退出代码1

宝石文件将保持安装在C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/sqlite3-1.4.0中进行检查。 结果记录到C:/Ruby26-x64/lib/ruby/gems/2.6.0/extensions/x64-mingw32/2.6.0/sqlite3-1.4.0/gem_make.out

1 个答案:

答案 0 :(得分:0)

这是Rails 5.2.2(issue #35153)的已知问题。

要对此sqlite的更改版本进行梳理:

gem 'sqlite3', '~> 1.3.6'