Heroku/Rails:如何在Heroku上安装GNU科学库(GSL)? [英] Heroku/Rails: How to install the GNU Scientific Library (GSL) on Heroku?

查看:114
本文介绍了Heroku/Rails:如何在Heroku上安装GNU科学库(GSL)?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要在运行Rails(4.0.2)应用程序的Heroku上安装GSL库,以使用依赖于它的一些宝石.

I need to install the GSL library on Heroku running a Rails (4.0.2) app to use some gems that depend on it.

目标: 安装GSL库以与 GSL 相似宝石(在Heroku中).

Goal: Install the GSL library to work with GSL and Similarity gems in Heroku.

尝试的方法:

  • Installing Ruby / GSL in Heroku Application: Heroku crashes after deploy. GSL gem is unable to find the lib. Trace: http://pastebin.com/CPcMUdCa
  • Tomwolfe's Heroku's Ruby buildpack adapted for using couchbase: Same issue.
  • Building Dependency Binaries for Heroku Applications: Vulcan is deprecated. More info on Heroku's Devcenter and on Github

我已经尝试按照以下步骤操作(编译二进制文件):

I've tried following these steps (compiling binaries):

  • GSL 1.15 downloaded from ftp://ftp.gnu.org/gnu/gsl/gsl-1.15.tar.gz
  • Uncompressed and cd gsl-1.15
  • ./configure
  • make clean
  • make
  • sudo make install

它适用于我的本地环境,但不适用于Heroku. Heroku不允许sudo,但允许使用heroku run进行访问.问题在于文件系统是临时的,而dyno仅在控制台会话期间有效.

It works on my local environment but not in Heroku. Heroku doesn't allow sudo but it allows access with heroku run. The problem is that the file system is ephemeral and the dyno will only live as long as your console session.

更新:

我也尝试过构建自己的Heroku Buildpack,但无法正常工作.我尝试使用 multipacks .我不是Heroku Buildpack专家,所以也许是问题所在,我正在学习更多有关的知识,以创建一个带有示例的简单存储库并对此问题进行扩展说明.

I've also tried building my own Heroku Buildpack but I couldn't make it work. I tried using multipacks. I'm not a Heroku Buildpack expert so maybe it's the problem, I'm learning more about it to make a simple repository with an example and an extended explanation of this issue.

推荐答案

几个月前,我为1.15和1.16制作了一个heroku buildpack

I made a heroku buildpack a couple months ago for 1.15 and 1.16

只要做:

heroku buildpacks:set git://github.com/gregory/heroku-gsl-buildpack.git#gsl-1.16

heroku buildpacks:set git://github.com/gregory/heroku-gsl-buildpack.git#gsl-1.15

这篇关于Heroku/Rails:如何在Heroku上安装GNU科学库(GSL)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆