安装Redmine。
我试过了,
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
,但我无法解决它。
您介意读一下这个问题吗?
Ruby 2.4 非常新。事实上,它仅在三天前发布。
由于 Ruby 2.4 中有几个重要的内部更改,因此很可能许多 gem(以及 Redmine 本身)尚未与该版本的 Ruby 兼容。
从您的错误消息来看,确实似乎需要调整 JSON gem 才能处理 Ruby 2.4 中有关整数的一些更改。
您现在应该使用旧版本的 Ruby,例如红宝石 2.3.3。正如你所看到的http://www.redmine.org/projects/redmine/wiki/RedmineInstall#Ruby-interpreter, Redmine 需要特定的 Ruby 版本,具体取决于 Redmine 的版本。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)