【问题标题】:Get FreeTDS working on Heroku Cedar Stack让 FreeTDS 在 Heroku Cedar Stack 上工作
【发布时间】:2012-04-08 16:15:36
【问题描述】:

我正在尝试将我的 Rails 应用程序部署到 Heroku。

我正在使用 Postgres,但在我的 database.yml 中,我还添加了一个定义来访问远程 sql 服务器。

在我的 Gemfile 中:

gem 'tiny_tds', '0.5.1'

在模型中:

establish_connection :my_sqlserver

这在开发模式下运行良好,但是当我尝试部署到 Heroku 时出现错误消息:

[...]
   Installing tiny_tds (0.5.1) with native extensions
   Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
   /usr/local/bin/ruby extconf.rb
   checking for iconv_open() in iconv.h... yes
   checking for sybfront.h... no
   -----
   freetds is missing.
   -----
   *** 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.
[...]

我找到了一个教程来让它工作,但它的解决方案有点复杂: https://github.com/rails-sqlserver/tiny_tds/issues/74

有什么想法让它发挥作用吗?

非常感谢...

【问题讨论】:

    标签: ruby-on-rails-3 heroku freetds cedar


    【解决方案1】:

    我有同样的问题。

    尝试安装 freetds-devel。 freetds-devel 包含在 rpmforge yum 存储库中。

    【讨论】:

    • 你是如何在 heroku 上安装 freetds 的?
    猜你喜欢
    • 1970-01-01
    • 2016-08-05
    • 1970-01-01
    • 2012-08-19
    • 1970-01-01
    • 2014-12-18
    • 1970-01-01
    • 2012-05-30
    • 1970-01-01
    相关资源
    最近更新 更多