安装Redmine。 我试过,Gem :: Ext :: BuildError:错误:无法构建gem本机扩展。在CenOS 6.5上
bundle install --without development test postgresql sqlite
,但错误。
Gem :: Ext :: BuildError:错误:无法构建gem本机扩展。
current directory:
/usr/local/lib/ruby/gems/2.4.0/gems/json-1.8.3/ext/json/ext/generator
/usr/local/bin/ruby -r ./siteconf20161228-21055-1dxe9y9.rb extconf.rb
creating Makefile
current directory:
/usr/local/lib/ruby/gems/2.4.0/gems/json-1.8.3/ext/json/ext/generator
make "DESTDIR=" clean
current directory:
/usr/local/lib/ruby/gems/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: error: ‘rb_cFixnum’ undeclared (first use in this
function)
generator.c:861: error: (Each undeclared identifier is reported only
once
generator.c:861: error: for each function it appears in.)
generator.c:863: error: ‘rb_cBignum’ undeclared (first use in this
function)
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"
make: *** [generator.o] error 1
make failed, exit code 2
Gem files will remain installed in
/usr/local/lib/ruby/gems/2.4.0/gems/json-1.8.3 for inspection.
Results logged to
/usr/local/lib/ruby/gems/2.4.0/extensions/x86_64-linux/2.4.0-static/json-1.8.3/gem_make.out
An error occurred while installing json (1.8.3), and Bundler
cannot continue.
Make sure that `gem install json -v '1.8.3'` succeeds before
bundling.
所以,我试过gem install json -v '1.8.3
,但我无法解决它。
你介意看看这个问题吗?
我看......这意味着红宝石2.4不支持JSON 1.8.3。然后,没有任何信息稳定(? )宝石列表下面的红宝石版本? 我想知道搜索关键字做我自己 – Johnson
那么,每个宝石实现自己的兼容机制。可以肯定,你必须阅读文档,尝试它或问维护者。你也可以谷歌的“[gemname]红宝石2.4”或“[gemname] [错误信息]”。至于json gem,他们支持Ruby 2.4 [自json 2.0以来](https://github.com/flori/json/blob/master/CHANGES.md#2015-09-11-200)。所需的更改[被回溯到1.8分支](https://github.com/flori/json/issues/308),但尚未发布。 –