2016-12-28 9 views
2

Redmine 설치. 시도했습니다.Gem :: Ext :: BuildError : 오류 : 젬 네이티브 확장을 빌드하지 못했습니다. CenOS 6.5

bundle install --without development test postgresql sqlite 

이지만 오류가 발생했습니다.

Gem :: Ext :: BuildError : 오류 : 젬 네이티브 확장을 빌드하지 못했습니다.

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을 시도했습니다,하지만 난 그것을 해결할 수 있습니다.

이 문제를 읽으시겠습니까?

답변

1

루비 2.4 인 문제를 해결해야 실행 해결 아주 새로운. 실제로, 그것은 단지 3 일 전에 풀어 놓였다.

Ruby 2.4에는 몇 가지 내부적 인 변경 사항이 있기 때문에 많은 보석 (및 Redmine 자체)이 아직이 Ruby 버전과 호환되지 않을 가능성이 높습니다.

오류 메시지에서 Ruby 2.4의 일부 변경 사항을 처리하기 위해 JSON gem을 수정해야합니다.

예를 들어 Ruby의 이전 버전을 사용해야합니다. Ruby 2.3.3. http://www.redmine.org/projects/redmine/wiki/RedmineInstall#Ruby-interpreter에서 볼 수 있듯이 Redmine은 Redmine의 버전에 따라 특정 Ruby 버전이 필요합니다.

+1

가 ... 즉, 루비 2.4 JSON 1.8.3를 지원하지 않는 것을 의미 :(프로그래밍 언어에 대한 이전 버전과의 호환성을 나누기 경우 항상 나쁘다. 그런 다음, 어떤 정보 (즉 안정이?) ruby ​​버전 이후의 보석 목록 자신을 위해 키워드 검색을 알고 싶습니다. – Johnson

+0

각 보석마다 고유 한 호환성 메커니즘이 구현되어 있습니다. 설명서를 읽거나 시도하거나 관리자에게 문의하십시오."[gemname] ruby ​​2.4"또는 "[gemname] [error message]"에 대해서도 google을 사용할 수 있습니다. 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). 아직 릴리스되지 않았습니다. –

0

처음 실행

gem install bundler 

그것은 새로운 들러를 설치하고 기본 확장 종속성

다음

bundle install 

그것이

0

지금 당장 같은 문제가 있습니다. gem install을 사용하여 수동으로 bundlerrmagick의 최신 버전을 설치하려면 다른 모든 패키지를 gem updatebundle update으로 업데이트하십시오. json 1.8.3ruby 2.4의이 종속성 문제가 해결되었습니다.

하지만 나중에 문제가 더 많이 발생합니다. ruby 2.4과 같은 이음새는 숫자 해석에서 약간의 변경을합니다. 즉, rail 4.x과 호환되지 않습니다. (see this post). 레드 마인은 activemodel (< 5.0, >= 4.0.1)에 따라 달라 rails 5.xactivemodel 5.x에 따라 protected_attributes을 필요로 rails 및 종속성을 업데이트 은 아직 possibles 것 같다.

그것은 업데이트가 특히 내가 볼