0

我在 MAC OS X yosemite 上使用 RubyMine IDE。在尝试安装 tiny_tds 时出现以下错误

sudo gem install tiny_tds -v '0.6.2'

构建原生扩展。这可能需要一段时间...

错误:安装 tiny_tds 时出错:

错误:无法构建 gem 原生扩展。

/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby extconf.rb

检查 iconv.h 中的 iconv_open() ... 否

检查 -liconv 中的 iconv_open()... 是

检查 sybfront.h... 是的

检查 sybdb.h... 是

检查 -lsybdb 中的 tdsdbopen()... 否

缺少freetds。

* 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

--没有-make-prog

--srcdir=。

--curdir

--ruby=/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby

--启用查找

--禁用查找

--with-iconv-dir

--without-iconv-dir

--with-iconv-include

--without-iconv-include=${iconv-dir}/include

--with-iconv-lib

--without-iconv-lib=${iconv-dir}/

--with-freetds-dir

--without-freetds-dir

--with-freetds-include

--without-freetds-include=${freetds-dir}/include

--with-freetds-lib

--without-freetds-lib=${freetds-dir}/

--with-iconvlib

--without-iconvlib

--with-sybdblib

--不带sybdblib

Gem 文件将继续安装在 /Library/Ruby/Gems/2.0.0/gems/tiny_tds-0.6.2 以供检查。结果记录到 /Library/Ruby/Gems/2.0.0/gems/tiny_tds-0.6.2/ext/tiny_tds/gem_make.out

我已经安装了freetds

酿造安装freetds

当我做 brew list 时我可以看到它

但是当我再次执行 sudo gem install tiny_tds 时,由于 freetds 丢失,它给了我错误。

请帮忙。

谢谢

4

2 回答 2

0

没有gem install tiny_tds工作?

仅供参考 - 使用sudowithgem install不是最佳做法。

于 2015-09-18T17:36:46.547 回答
0

正如我在Homebrew / TinyTDS / FreeTDS bundle error上发布的那样,除此之外brew install freetds,您可能还需要告诉 gem 在哪里可以找到 freetds。

如果您使用的是 bundler,则可以通过配置 bundler 来做到这一点。

例如(取决于 homebrew 安装 freetds 的确切位置):

bundle config set --global build.tiny_tds --with-freetds-dir=/opt/homebrew/Cellar/freetds/1.3.3
于 2021-12-09T06:26:47.557 回答