我試圖讓rails正常工作,並且無法通過binding_of_caller
寶石,該寶石嘗試在運行sudo gem install rails
後與其他寶石一起安裝。我不認爲這個gem是導軌工作所必需的,但不知道如何跳過它,或者阻止它嘗試安裝。gem install rails失敗bind_of_caller gem
每次寶石名單到達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.
我運行OSX 10.8.2
和使用POW Web服務器與rbenv管理紅寶石。我也跑紅寶石1.9.3-p385
。 – Arel 2013-02-27 23:05:42
請注意,如果升級到Ruby 2.0時出現此錯誤,則此答案即爲答案。這是因爲你可能需要將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 – Taytay 2013-03-09 16:31:31
你可能需要運行'bundle update'作爲一個整個..但是,這是方式。謝謝! – Tigraine 2013-06-26 19:30:27