我们目前正在尝试将 sqlite3 和 sqlite3-ruby 打包到一个将作为开源(基于 ruby/rails)发布的应用程序中。
我正在评估是否可以为 Windows、Linux 和 Mac 打包 sqlite3-ruby。
我的想法是,在所有平台上下载 sqlite3-amalgamation、sqlite3-ruby,然后在每个平台上进行编译。
以下是我的问题/当前问题:
1) 编译指出:
安装 SQLite3,启用选项 SQLITE_ENABLE_COLUMN_METADATA
我把它放在哪里?在生成文件中?任何指示或示例都会非常有帮助!
2)用当前的sqlite3编译sqlite3-ruby - sqlite3-ruby似乎搜索sqlite.h
,不幸的是当前的sqlite3似乎只提供sqlite3.h
;我在这里做错了什么?
我编译 sqlite3-ruby 的想法/步骤可能是错误的吗?
- 从 sqlite.org 下载合并文件
- 编译到自定义目录
- 将
install.rb
(第 11 行)更改为:
unless system( "ruby extconf.rb --with-sqlite-dir=/my/ custom_dir" )
非常欢迎任何指点或帮助!
We are currently trying to package sqlite3 and sqlite3-ruby with an application that will be released as open source (ruby/rails based).
I am evaluating if it is possible to package sqlite3-ruby for Windows, Linux and Mac.
My thoughts were, to download sqlite3-amalgamation, sqlite3-ruby on all the platforms and then compile on each.
Here are my questions/current problems:
1) The sqlite3-ruby docs on compiling states:
Install SQLite3, enabling option SQLITE_ENABLE_COLUMN_METADATA
Where do I put this? In the makefile? Any pointers or an example would be really helpful!
2) Compiling sqlite3-ruby with the current sqlite3 - sqlite3-ruby seems to search for sqlite.h
, unfortunately the current sqlite3 seems to only provide sqlite3.h
; What am I doing wrong here?
Are my thoughts/steps on compiling sqlite3-ruby wrong, maybe?
- Download amalgamation from sqlite.org
- Compile to a custom dir
- Change
install.rb
(line 11) to:
unless system( "ruby extconf.rb --with-sqlite-dir=/my/custom_dir" )
Any pointers or help very welcome!
发布评论
评论(2)
回复:Windows你可以只使用Windows预编译的二进制gem。
re: windows you can just use the windows precompiled binary gem.
启用列元数据集
CFLAGS = -DSQLITE_ENABLE_COLUMN_METADATA
要部分回答一个非常古老的问题,请在 Makefile 中 。默认情况下,Makefile 中该行没有任何内容 (
CFLAGS =
)(文档)
To partially answer a really old question, to enable column meta-data set
CFLAGS = -DSQLITE_ENABLE_COLUMN_METADATA
in the Makefile. By default there is nothing on that line in the Makefile (
CFLAGS =
)(doc)