1

我正在尝试使用用于加密的 GMP 库部署 Ruby on Rails 应用程序。在开发中一切正常。

当我 git push 到 Heroku 或 Openshift 时,我收到以下错误消息:

remote: Installing gmp (0.5.47) with native extensions .........
remote: 
remote: Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
remote: 
remote:         /opt/rh/ruby193/root/usr/bin/ruby extconf.rb 
remote: checking for gmp.h... no
remote: can't find gmp.h, try --with-gmp-include=<path>
remote: checking for __gmpz_init() in -lgmp... no
remote: can't find -lgmp, try --with-gmp-lib=<path>
remote: checking for mpfr.h... no
remote: checking for SIZEOF_INTPTR_T... yes
remote: *** extconf.rb failed ***
remote: Could not create Makefile due to some reason, probably lack of
remote: necessary libraries and/or headers.  Check the mkmf.log file for more
remote: details.  You may need configuration options.

事实证明,Heroku 支持人员承认他们的堆栈映像还不包括 GMP。他们建议我编写自己的 buildpack 以在生产服务器上包含 GMP 库。即使在此处查看 OpennSSL 的自定义构建包后,我也不知道。欢迎任何建议。

4

0 回答 0