Heroku Cedar OpenSSL错误的FreeTDS buildpack

时间:2015-03-11 10:33:11

标签: ruby heroku openssl freetds tiny-tds

我有一个sinatra机架ruby应用程序,我想在heroku上部署。该应用程序需要连接到SQL Server数据库。为此,我需要TinyTds宝石。

的Gemfile

source 'http://rubygems.org'
ruby "1.9.3"
gem 'sinatra'
gem 'tiny_tds'

捆绑安装后的Gemfile.lock

GEM
  remote: http://rubygems.org/
  specs:
    rack (1.6.0)
    rack-protection (1.5.3)
      rack
    sinatra (1.4.5)
      rack (~> 1.4)
      rack-protection (~> 1.4)
      tilt (~> 1.3, >= 1.3.4)
    tilt (1.4.1)
    tiny_tds (0.6.2)

PLATFORMS
  ruby

DEPENDENCIES
  sinatra
  tiny_tds

TinyTds需要FreeTDS,heroku显然没有。所以在互联网上有一些疯狂的解决方案,在heroku类似的虚拟机和类似的东西中使用静态编译。最合理的解决方案是为我的应用程序设置一个包含FreeTDS的自定义buildpack:

heroku create my_new_app --buildpack https://github.com/firmhouse/heroku-buildpack-ruby-freetds.git

然而

$ git push heroku master
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> Fetching custom git buildpack... done
remote: -----> Ruby/Rack app detected
remote: Installing freetds into /tmp/build_7b7e059c43475a97d6c091bcf9162e16/vendor/freetds
remote:
remote:   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
remote:                                  Dload  Upload   Total   Spent    Left  Speed
remote: 100 3590k  100 3590k    0     0  17.8M      0 --:--:-- --:--:-- --:--:-- 17.8M
remote:
remote: -----> Using Ruby version: ruby-1.9.3
remote: -----> Installing dependencies using Bundler version 1.7.12
remote:        Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin --deployment
remote:        Could not load OpenSSL.
remote:        You must recompile Ruby with OpenSSL support or change the sources in your
remote:        Gemfile from 'https' to 'http'. Instructions for compiling with OpenSSL using
remote:        RVM are available at http://rvm.io/packages/openssl.
remote:  !
remote:  !     Failed to install gems via Bundler.
remote:  !
remote:
remote:  !     Push rejected, failed to compile Ruby/Rack app
remote:
remote: Verifying deploy...
remote:
remote: !       Push rejected to my_new_app.
remote:
To https://git.heroku.com/my_new_app.git
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/my_new_app.git'

编辑:我的问题是如何让heroku与tiny_tds一起使用。

0 个答案:

没有答案