Rails 应用程序的 sqlite3-ruby 编译和 sqlite3 打包

发布于 2024-09-12 12:02:17 字数 851 浏览 1 评论 0 原文

我们目前正在尝试将 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 的想法/步骤可能是错误的吗?

  1. 从 sqlite.org 下载合并文件
  2. 编译到自定义目录
  3. 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?

  1. Download amalgamation from sqlite.org
  2. Compile to a custom dir
  3. Change install.rb (line 11) to:

unless system( "ruby extconf.rb --with-sqlite-dir=/my/custom_dir" )

Any pointers or help very welcome!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

指尖上的星空 2024-09-19 12:02:17

回复:Windows你可以只使用Windows预编译的二进制gem。

re: windows you can just use the windows precompiled binary gem.

香草可樂 2024-09-19 12:02:17

启用列元数据集

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)

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文