2016-06-30 4 views
1

I 반응 레일을 사용하여 프로젝트를하고 있어요하지만 난

bundle install 

을 실행할 때 나는 특히

Could not find json-1.8.1 in any of the sources 

를 얻을이는 소스의에서 JSON-1.8.1을 찾을 수 없습니다 전체 오류

Gem::Ext::BuildError: ERROR: Failed to build gem native extension. 

    current directory: /Users/montana/.rvm/gems/ruby-2.3.0/gems/json-1.8.1/ext/json/ext/generator 
/Users/montana/.rvm/rubies/ruby-2.3.0/bin/ruby -r ./siteconf20160629-5602-i1di2t.rb extconf.rb 
creating Makefile 

current directory: /Users/montana/.rvm/gems/ruby-2.3.0/gems/json-1.8.1/ext/json/ext/generator 
make "DESTDIR=" clean 

current directory: /Users/montana/.rvm/gems/ruby-2.3.0/gems/json-1.8.1/ext/json/ext/generator 
make "DESTDIR=" 
compiling generator.c 
In file included from generator.c:1: 
./../fbuffer/fbuffer.h:175:47: error: too few arguments provided to function-like macro invocation 
    VALUE result = rb_str_new(FBUFFER_PAIR(fb)); 
              ^
/Users/montana/.rvm/rubies/ruby-2.3.0/include/ruby-2.3.0/ruby/intern.h:797:9: note: macro 'rb_str_new' defined here 
#define rb_str_new(str, len) __extension__ ( \ 
     ^
In file included from generator.c:1: 
./../fbuffer/fbuffer.h:175:11: warning: incompatible pointer to integer conversion initializing 'VALUE' (aka 'unsigned long') with an expression of type 'VALUE (const char *, long)' (aka 'unsigned long (const char *, long)') [-Wint-conversion] 
    VALUE result = rb_str_new(FBUFFER_PAIR(fb)); 
     ^  ~~~~~~~~~~ 
1 warning and 1 error generated. 
make: *** [generator.o] Error 1 

가 유래에 이에 대한 다양한 글이었다, 대부분의 "솔루션 '하지만 없음을 시도하는 것은, 내가 알 나를 위해 작동하는 것 그래서 그것은 내가 보석, & 들러 업데이트, 봄을 중지하려고했습니다

json (1.8.3) 
multi_json (1.10.1) 

를 통해 JSON 보석을 말한다

gem list | grep json 

을 달렸다. 나는 또한 도망 쳤다

rbenv rehash 

아무 소용이 없다고해도, 어떤 입력이라도 매우 높이 평가할 수있다.

+0

어떻게됩니까? – oreoluwa

+0

oreoluwa 답장을 보내 주셔서 감사합니다. 정확한 오류가납니다. 나는 실제로 json을 가지고 있는지 확인하기 위해 'json - version'도 실행했다. – Montana

+0

이것 좀 봐 : http://rubyofftherails.blogspot.com/2016/06/building-native-extensions-for-ruby-gems.html –

답변

1

루비 버전을 낮추거나 json 버전을 부칠 수 있습니다. 참조 : https://github.com/flori/json/issues/229

오늘부터 json 1.8.1 gemspec에 대한 간략한 설명과 루비 2.3.0 지원에 대한 언급이 없었습니다.

+0

Ruby 2.3.1에서 json 1.8.1을 사용하고 현재까지 문제가 없었습니다. –

+0

많은 gemspec을 고맙게 생각합니다. 'rvm install ruby-2.1.1'을 실행 한 다음 'rvm use ruby-2.1.1'을 실행하면 매력처럼 작동합니다. – Montana

3

지난번에 Ubuntu에 문제가있어서 library을 설치하려고했지만 잘 작동했습니다.

sudo apt-get install libgmp3-dev 

당신은에서 문서를 참조 할 수 있습니다 : 당신이 분명 당신의 Gemfile.lock과 다시`번들 install '이다 실행할 때 Failed to build gem json native extension