安裝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),但尚未發佈。 –