Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/ruby/23.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/heroku/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ruby 为什么Heroku';s heroku-18堆栈仅与Puma版本3.7.x兼容?_Ruby_Heroku_Rubygems_Puma - Fatal编程技术网

Ruby 为什么Heroku';s heroku-18堆栈仅与Puma版本3.7.x兼容?

Ruby 为什么Heroku';s heroku-18堆栈仅与Puma版本3.7.x兼容?,ruby,heroku,rubygems,puma,Ruby,Heroku,Rubygems,Puma,通过反复试验,我确定从Heroku的Heroku-16堆栈升级到Heroku-18堆栈需要在Rails应用程序中更新Puma 下面是为puma gem构建本机扩展的失败。你能解释一下为什么puma gem v3.7之前的版本会出现这种故障吗 Gem::Ext::BuildError: ERROR: Failed to build gem native extension. current directory: /tmp/build_893b3955637fcd96d49136f0c3564c5

通过反复试验,我确定从Heroku的
Heroku-16
堆栈升级到
Heroku-18
堆栈需要在Rails应用程序中更新Puma

下面是为puma gem构建本机扩展的失败。你能解释一下为什么puma gem v3.7之前的版本会出现这种故障吗

Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

current directory:
/tmp/build_893b3955637fcd96d49136f0c3564c51/vendor/bundle/ruby/2.4.0/gems/puma-3.6.2/ext/puma_http11
/tmp/build_893b3955637fcd96d49136f0c3564c51/vendor/ruby-2.4.5/bin/ruby -r
./siteconf20190110-284-13d7ke9.rb extconf.rb
checking for BIO_read() in -lcrypto... yes
checking for SSL_CTX_new() in -lssl... yes
checking for openssl/bio.h... yes
creating Makefile

current directory:
/tmp/build_893b3955637fcd96d49136f0c3564c51/vendor/bundle/ruby/2.4.0/gems/puma-3.6.2/ext/puma_http11
make "DESTDIR=" clean

current directory:
/tmp/build_893b3955637fcd96d49136f0c3564c51/vendor/bundle/ruby/2.4.0/gems/puma-3.6.2/ext/puma_http11
make "DESTDIR="
compiling http11_parser.c
In file included from ext/puma_http11/http11_parser.rl:7:0:
ext/puma_http11/http11_parser.rl: In function ‘puma_parser_execute’:
ext/puma_http11/http11_parser.rl:111:17: warning: comparison between signed and
unsigned integer expressions [-Wsign-compare]
ext/puma_http11/http11_parser.rl: At top level:
cc1: warning: unrecognized command line option ‘-Wno-self-assign’
cc1: warning: unrecognized command line option ‘-Wno-constant-logical-operand’
cc1: warning: unrecognized command line option ‘-Wno-parentheses-equality’
compiling io_buffer.c
compiling mini_ssl.c
mini_ssl.c: In function ‘get_dh1024’:
mini_ssl.c:90:5: error: dereferencing pointer to incomplete type ‘DH {aka struct
dh_st}’
   dh->p = BN_bin2bn(dh1024_p, sizeof(dh1024_p), NULL);
     ^~
mini_ssl.c: In function ‘engine_init_server’:
mini_ssl.c:139:3: warning: ISO C90 forbids mixed declarations and code
[-Wdeclaration-after-statement]
   ID sym_cert = rb_intern("cert");
   ^~
mini_ssl.c:144:3: warning: ISO C90 forbids mixed declarations and code
[-Wdeclaration-after-statement]
   ID sym_ca = rb_intern("ca");
   ^~
mini_ssl.c:166:3: warning: ISO C90 forbids mixed declarations and code
[-Wdeclaration-after-statement]
   DH *dh = get_dh1024();
   ^~
mini_ssl.c:170:3: warning: ISO C90 forbids mixed declarations and code
[-Wdeclaration-after-statement]
   EC_KEY *ecdh = EC_KEY_new_by_curve_name(NID_secp521r1);
   ^~~~~~
mini_ssl.c: In function ‘engine_init_client’:
mini_ssl.c:197:3: warning: ‘DTLSv1_method’ is deprecated
[-Wdeprecated-declarations]
   conn->ctx = SSL_CTX_new(DTLSv1_method());
   ^~~~
In file included from /usr/include/openssl/ct.h:13:0,
                 from /usr/include/openssl/ssl.h:61,
                 from mini_ssl.c:15:
/usr/include/openssl/ssl.h:1642:1: note: declared here
 DEPRECATEDIN_1_1_0(__owur const SSL_METHOD *DTLSv1_method(void)) /* DTLSv1.0 */
 ^
mini_ssl.c: In function ‘engine_shutdown’:
mini_ssl.c:333:8: warning: unused variable ‘buf’ [-Wunused-variable]
   char buf[512];
        ^~~
mini_ssl.c:332:11: warning: unused variable ‘err’ [-Wunused-variable]
   int ok, err;
           ^~~
mini_ssl.c: In function ‘engine_init’:
mini_ssl.c:350:8: warning: unused variable ‘buf’ [-Wunused-variable]
   char buf[512];
        ^~~
mini_ssl.c:349:11: warning: unused variable ‘err’ [-Wunused-variable]
   int ok, err;
           ^~~
mini_ssl.c:349:7: warning: unused variable ‘ok’ [-Wunused-variable]
   int ok, err;
       ^~
mini_ssl.c: At top level:
cc1: warning: unrecognized command line option ‘-Wno-self-assign’
cc1: warning: unrecognized command line option ‘-Wno-constant-logical-operand’
cc1: warning: unrecognized command line option ‘-Wno-parentheses-equality’
Makefile:241: recipe for target 'mini_ssl.o' failed
make: *** [mini_ssl.o] Error 1

make failed, exit code 2

Gem files will remain installed in
/tmp/build_893b3955637fcd96d49136f0c3564c51/vendor/bundle/ruby/2.4.0/gems/puma-3.6.2
for inspection.
Results logged to
/tmp/build_893b3955637fcd96d49136f0c3564c51/vendor/bundle/ruby/2.4.0/extensions/x86_64-linux/2.4.0-static/puma-3.6.2/gem_make.out

An error occurred while installing puma (3.6.2), and Bundler cannot continue.
Make sure that `gem install puma -v '3.6.2'` succeeds before bundling.
该堆栈基于OpenSSL 1.0.2附带的Ubuntu 16.04,而该堆栈基于OpenSSL 1.1.0附带的Ubuntu 18.04

在这些OpenSSL版本之间,有相当多的API和行为更改,这通常需要对直接使用OpenSSL API的软件进行一些更改(就像Puma一样)


在Puma 3.7.0中,必须使其与OpenSSL 1.1.0兼容,从而使其成为第一个与该版本兼容的版本。

我想知道您为什么要运行该gem的如此旧的版本?@spickermann我不想运行旧的gem。我想升级堆栈,但我不认为这应该是一个反复试验的过程来确定堆栈和gem版本之间的兼容性。我想我自己确定puma3.6失败原因的唯一方法是熟悉C语言来跟踪错误。感谢您的解释。我在阅读RubyonRails教程第5版时遇到了一个构建错误,因为我试图使用Puma3.4.0(本书中使用的特定版本)。不限制版本并升级到3.12.1修复了我的问题。谢谢