gem install rails失败bind_of_caller gem
我试图让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
尝试更新的宝石:
$ bundle update binding_of_caller
看起来像youre使用Linux。尝试通过首先安装ruby和rvm来遵循rails安装。这可能是过时的红宝石版本的原因。尽管在黑暗中。
我正在运行OSX 10.8.2并使用rbenv的pow web服务器来管理ruby。我也运行红宝石1.8.7 p-358。我完全迷失在这里。我花了所有的下午/晚上试图让这个工作。我会用上面的信息更新问题,并尝试更新我的红宝石。 – Arel 2013-02-19 04:40:00
我现在在使用ruby 1.9.3-p385。同样的问题。这个问题据我所知是binding_of_caller,所以我相信解决方案包括跳过或删除那个宝石,或者以某种方式解决上述问题。 – Arel 2013-02-19 05:27:35
表示找不到vm_core.h。试试这个gem install ruby-debug19 - --with-ruby-include = $ rvm_path/src/ruby-1.9.3 -p385 – TakaGoto 2013-02-19 05:34:23
好了,问题是,如正在使用的项目红宝石版本RBENV红宝石版本不被认可。因此,在尝试让rbenv工作一段时间后,我切换回RVM进行了一些调试,并安装了一些依赖项,安装了ruby 2.0.0p0,并将其识别为项目ruby。然后我能够捆绑。所以要回答我的问题......这是一个红宝石版本问题。
使用rbenv解决这个问题有什么进展吗?
我使用rbenv在本地加载jruby 2.0,我想继续使用此解决方案而不是rvm。现在,根据所标注的答案
Ascended:Ascended foundation3 $ gem install binding_of_caller -v '0.7.2'
Building native extensions. This could take a while...
ERROR: Error installing binding_of_caller:
ERROR: Failed to build gem native extension.
/Users/Ascended/.rbenv/versions/jruby-1.7.4/bin/jruby extconf.rb
/Users/Ascended/.rbenv/versions/jruby-1.7.4/lib/ruby/shared/mkmf.rb:1:in `(root)': Use RbConfig instead of obsolete and depreca
ted Config.
/Users/Ascended/.rbenv/versions/jruby-1.7.4/lib/ruby/shared/mkmf.rb:1791:in `init_mkmf': Use RbConfig instead of obsolete and deprecated Config.
/Users/Ascended/.rbenv/versions/jruby-1.7.4/lib/ruby/shared/mkmf.rb:1791:in `init_mkmf': Use RbConfig instead of obsolete and $eprecated Config.
creating Makefile
make
cc -I. -I/Users/Ascended/.rbenv/versions/jruby-1.7.4/lib/native/include -I/Users/Ascended/.rbenv/versions/jruby-1.7.4/lib/nati$e/include/ruby -I. -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -fPIC -DTARGET_RT_MAC_CFM=0 -fno-omit-frame-pointer -fno-strict-al$asing -fexceptions -O0 -std=c99 -arch x86_64 -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/Ascended/.rbenv/versions/jruby-1.7.4/lib/ruby/gems/shared/gems/binding_of_caller-0.7$2 for inspection.
Results logged to /Users/Ascended/.rbenv/versions/jruby-1.7.4/lib/ruby/gems/shared/gems/binding_of_caller-0.7.2/ext/binding_of$caller/gem_make.out
-
Ascended:Ascended foundation3 $ rbenv local
jruby-1.7.4
Ascended:Ascended foundation3 $ jruby --version
jruby 1.7.4 (2.0.0) 2013-05-16 2390d3b on Java HotSpot(TM) 64-Bit Server VM 1.6.0_51-b11-457-11M4509 [darwin-x86_64]
Ascended:Ascended foundation3 $ gcc --version
i686-apple-darwin11-llvm-gcc-4.2 (GCC) 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.11.00)
Copyright (C) 2007 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
我的〜/ .jrubyconf设置为
compat.version=2.0
cext.enabled=true
errno.backtrace=true
,当我尝试安装来电者的结合,我得到以下在这个线程中正确,这是rbenv的一个问题,但jruby 1.7.4是正确的版本,它是在2.0下运行的。不应该这样工作吗?我不了解什么?
rbenv遇到的问题是它没有为我的环境加载适当版本的ruby。我会做命令来改变我的ruby版本,它不会采取。这个ruby问题最终成为'binding_of_caller'不能创建的原因,也是我转回到rvm的原因。如果'ruby -v'返回预期的红宝石版本,我不确定你需要做什么。 – Arel 2013-08-15 14:16:24
好的,昨晚我无法让它工作,所以我暂时停止使用pry-debugger,但是无法安装像这样的宝石,严重降低了ruby的内省能力,我需要一个工作很快。 – Theta 2013-08-15 18:08:27
如果你这样做,请张贴,我会给你复选标记,因为我宁愿回到使用rbenv。 – Arel 2013-08-15 18:12:10
。 – 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