Heroku/Rails:如何在Heroku上安装GNU科学库(GSL)? [英] Heroku/Rails: How to install the GNU Scientific Library (GSL) on Heroku?
问题描述
我需要在运行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.
尝试的方法:
- 在Heroku应用程序中安装Ruby/GSL :Heroku在部署后崩溃. GSL gem无法找到该库.跟踪: http://pastebin.com/CPcMUdCa
- Tomwolfe的Heroku的Ruby buildpack适用于沙发床:同样的问题.
- 为Heroku应用程序构建依赖关系二进制文件:不推荐使用Vulcan.有关 Heroku的Devcenter 和
- 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):
-
从 ftp://ftp.gnu.org下载的
- GSL 1.15 /gnu/gsl/gsl-1.15.tar.gz
- 未压缩和
cd gsl-1.15
-
./configure
-
make clean
-
make
-
sudo make install
- 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屋!