gpt4 book ai didi

ruby-on-rails - Gem::Ext::BuildError:错误:无法构建 gem native 扩展。在 CentOS 6.5 上

转载 作者:太空宇宙 更新时间:2023-11-03 16:59:35 26 4
gpt4 key购买 nike

安装红矿。我试过了,

bundle install --without development test postgresql sqlite

,但错误。

Gem::Ext::BuildError:错误:无法构建 gem native 扩展。

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,但我无法解决它。

您介意只读一下这个问题吗?

最佳答案

Ruby 2.4 非常新。事实上,它仅在 3 天前发布。

由于 Ruby 2.4 中有几个重要的内部变化,很可能许多 gems(和 Redmine 本身)还不兼容这个版本的 Ruby。

从您的错误消息来看,似乎确实需要调整 JSON gem 以处理 Ruby 2.4 中有关整数的一些更改。

您现在应该使用旧版本的 Ruby,例如 ruby 2.3.3。正如您在 http://www.redmine.org/projects/redmine/wiki/RedmineInstall#Ruby-interpreter 上看到的那样, Redmine 需要特定的 Ruby 版本,具体取决于 Redmine 的版本。

关于ruby-on-rails - Gem::Ext::BuildError:错误:无法构建 gem native 扩展。在 CentOS 6.5 上,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41356086/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com