【发布时间】:2012-08-08 23:37:32
【问题描述】:
上下文:
- 我有一个应用程序大量使用 GSL 库及其 红宝石绑定。
- 我想将应用程序部署到 Heroku。我对编程很陌生 一般,部署少得多,而且 Heroku 使用起来非常简单, 尤其适用于 Rails 应用。
- 我的笔记本电脑上安装了 GSL。我正在使用“gsl”gem。
问题:
- gem 要求已安装 GSL 库。
- GSL 尚未安装在 Heroku 环境中。
-
所以,不出所料,我在
git push heroku master之后从 Heroku 收到了这个错误-----> Heroku receiving push -----> Removing .DS_Store files -----> Ruby/Rails app detected -----> Installing dependencies using Bundler version 1.2.0.rc Running: bundle install --without development:test --path vendor/bundle --binstubs bin/ --deployment ... Installing gsl (1.14.7) with native extensions Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension. /usr/local/bin/ruby extconf.rb checking gsl version... *** 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. Provided configuration options: --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 --without-make-prog --srcdir=. --curdir --ruby=/usr/local/bin/ruby extconf.rb:237:in `rescue in <main>': Check GSL>=0.9.4 is installed, and the command "gsl-config" is in search path. (RuntimeError) from extconf.rb:138:in `<main>'
(可能的)解决方案:
- 似乎使用 Heroku 的 buildpacks 是可能的途径。 This(打包二进制 buildpack 依赖项)似乎很有希望。
- 我只是不明白教程中发生了什么,或者如何使用 vulcan。
我的期望:
- 关于如何使 GSL 库可用于我在 Heroku 上的应用程序的易于理解的说明。
非常感谢!!
【问题讨论】:
-
这是在自定义 buildpack 中安装二进制文件的示例:github.com/davidjrice/heroku-buildpack-couchbase-ruby/blob/…
-
@Schneems 据我了解,我 fork 这个 buildpack,将 libvbucket 二进制文件替换为 GSL 二进制文件,并将 libvbucket 特有的安装功能替换为 GSL 特有的一些功能,我应该越来越接近了?