Ruby Thin 现在好像还不能支持 Ruby 2.4.0,有什么办法吗?还是说暂时只能等一等?

lithium4010 · 2017年01月16日 · 最后由 huacnlee 回复于 2017年01月16日 · 1945 次阅读

已解决

https://github.com/flori/json/issues/303

直接升级的话会报错

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

       current directory:
       /server/vendor/bundle/ruby/2.4.0/gems/json-1.8.3/ext/json/ext/generator
       /usr/local/bin/ruby -r ./siteconf20170116-11-20pdry.rb extconf.rb
       creating Makefile

       current directory:
       /server/vendor/bundle/ruby/2.4.0/gems/json-1.8.3/ext/json/ext/generator
       make "DESTDIR=" clean

       current directory:
       /server/vendor/bundle/ruby/2.4.0/gems/json-1.8.3/ext/json/ext/generator
       make "DESTDIR="
       compiling generator.c
       generator.c: In function 'generate_json':
       generator.c:861:25: error: 'rb_cFixnum' undeclared (first use in this function)
            } else if (klass == rb_cFixnum) {
                                ^
       generator.c:861:25: note: each undeclared identifier is reported only once for
       each function it appears in
       generator.c:863:25: error: 'rb_cBignum' undeclared (first use in this function)
            } else if (klass == rb_cBignum) {
                                ^
       generator.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"
       cc1: warning: unrecognized command line option "-Wno-tautological-compare"
       Makefile:241: recipe for target 'generator.o' failed
       make: *** [generator.o] Error 1

       make failed, exit code 2

       Gem files will remain installed in
       /server/vendor/bundle/ruby/2.4.0/gems/json-1.8.3 for inspection.
       Results logged to
       /server/vendor/bundle/ruby/2.4.0/extensions/x86_64-linux/2.4.0/json-1.8.3/gem_make.out

用 Puma 或 Unicorn

lithium4010 关闭了讨论。 01月16日 15:40
需要 登录 后方可回复, 如果你还没有账号请 注册新账号