即使在Gemfile中没有json,Bundler也会在json安装上停止

时间:2013-05-02 15:14:09

标签: ruby json rvm bundle bundler

项目包在json安装时因错误而停止。但我不是要求在Gemfile中使用json。 RVM中的当前Ruby是1.9.2-p290,严格。

不知道解决这个问题。可能有帮助吗?

 Installing json (1.7.7) 
 Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.

        /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby extconf.rb 
 creating Makefile

 make
 xcrun cc -I. -     I/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/universal-darwin12.0 -I/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/universal-darwin12.0 -I. -DJSON_GENERATOR  -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE   -fno-common -arch i386 -arch x86_64 -g -O3 -pipe -fno-common -DENABLE_DTRACE  -fno-common  -pipe -fno-common   -c generator.c
 xcrun: Error: could not stat active Xcode path '/Developer'. (No such file or directory)
 cc -arch i386 -arch x86_64 -pipe -bundle -undefined dynamic_lookup -o generator.bundle generator.o -L. -L/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib -L. -arch i386 -arch x86_64     -lruby  -lpthread -ldl -lobjc  
 i686-apple-darwin11-llvm-gcc-4.2: generator.o: No such file or directory
 i686-apple-darwin11-llvm-gcc-4.2: generator.o: No such file or directory
 lipo: can't figure out the architecture type of:     /var/folders/ft/gswz6cs52wb9jh_v5h2yt5_h0000gn/T//ccvGNawc.out
 make: *** [generator.bundle] Error 1


 Gem files will remain installed in /Users/noAlvaro/.rvm/gems/ruby-1.9.2-p290@heroku_project/gems/json-1.7.7 for inspection.
 Results logged to /Users/noAlvaro/.rvm/gems/ruby-1.9.2-p290@heroku_project/gems/json-1.7.7/ext/json/ext/generator/gem_make.out

 An error occurred while installing json (1.7.7), and Bundler cannot continue.
 Make sure that `gem install json -v '1.7.7'` succeeds before bundling.

任何帮助,任何事情,都将非常感激。 :)

1 个答案:

答案 0 :(得分:1)

即使您没有明确地将json列为依赖项,您正在使用的其他宝石也可能会这样做。因此,Bundler会将其包含在捆绑列表中。

要检查哪个库正在使用json,您可以检查Gemfile.lock文件或使用bundle viz绘制依赖关系树。