gem install rails在binding_of_caller gem失败

Are*_*rel 9 ruby-on-rails bundler

我正在努力让rails工作,并且无法通过一个binding_of_caller宝石试图在运行后与其他宝石一起安装sudo gem install rails.我不认为gem需要rails才能工作,但是无法弄清楚如何跳过它,或者阻止它尝试安装.

每次宝石列表到达时,binding_of_callers我都会得到以下信息:

Installing binding_of_callers (0.6.9) with native extensions

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. -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE   -fno-common -arch i386 -arch x86_64 -g -Os -pipe -fno-common -DENABLE_DTRACE  -fno-common  -pipe -fno-common  -O0 -std=c99  -c binding_of_caller.c
binding_of_caller.c:4:10: fatal error: 'vm_core.h' file not found
#include "vm_core.h"
         ^
1 error generated.
make: *** [binding_of_caller.o] Error 1


Gem files will remain installed in /Users/ericavirtue/.bundler/tmp/54559/gems/binding_of_caller-0.6.9 for inspection.
Results logged to /Users/ericavirtue/.bundler/tmp/54559/gems/binding_of_caller-0.6.9/ext/binding_of_caller/gem_make.out
An error occurred while installing binding_of_caller (0.6.9), and Bundler cannot continue.
Make sure that `gem install binding_of_caller -v '0.6.9'` succeeds before bundling.
Run Code Online (Sandbox Code Playgroud)

我正在运行OSX 10.8.2并使用带有rbenv的pow web服务器来管理ruby.我也在运行红宝石1.9.3-p385

小智 11

尝试更新gem:

$ bundle update binding_of_caller

  • 请注意,如果在升级到Ruby 2.0时出现此错误,则此_is_答案.那是因为您可能需要将binding_of_caller更新为0.7.1.在这里找到:http://www.gavinmorrice.com/blog/posts/37-ruby-2-0-0-an-error-occurred-while-installing-binding_of_caller (2认同)