在Windows上捆绑或安装ruby-prof失败

时间:2012-02-09 03:43:05

标签: ruby-on-rails ruby ruby-prof

民间,

我努力通过捆绑器在windows xp和windows 7上安装ruby-prof,但根本不幸运, 在ruby-prof的主站点,它说我们需要为windows安装版本'0.7.3',我试过

gem install ruby-prof -v '0.7.3'

但失败了,然后我试了

gem install ruby-prof -v '0.7.3' --platform=mswin32

它成功了,但是当我再次运行bundle update时,错误仍然存​​在。 Gemfile就像这个gem "ruby-prof", '0.7.3',错误如下:

Installing ruby-prof (0.7.3) with native extensions
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension
.

        C:/Ruby192/bin/ruby.exe extconf.rb
checking for sys/times.h... no
checking for rb_os_allocated_objects()... no
checking for rb_gc_allocated_size()... no
checking for rb_gc_collections()... no
checking for rb_gc_time()... no
checking for rb_heap_total_mem()... no
checking for rb_gc_heap_info()... no
checking for rb_gc_malloc_allocations()... no
checking for rb_gc_malloc_allocated_size()... no
creating Makefile

make
C:/Ruby192/bin/ruby -e "puts 'EXPORTS', 'Init_ruby_prof'"  > ruby_prof-i386-ming
w32.def
gcc -I. -IC:/Ruby192/include/ruby-1.9.1/i386-mingw32 -I/C/Ruby192/include/ruby-1
.9.1/ruby/backward -I/C/Ruby192/include/ruby-1.9.1 -I.   -O3 -g -Wextra -Wno-unu
sed-parameter -Wno-parentheses -Wpointer-arith -Wwrite-strings -Wno-missing-fiel
d-initializers -Wno-long-long  -o ruby_prof.o -c ruby_prof.c
ruby_prof.c:241:1: warning: initialization from incompatible pointer type
ruby_prof.c:867:35: error: expected declaration specifiers or '...' before 'NODE
'
ruby_prof.c: In function 'prof_event_hook':
ruby_prof.c:1114:36: error: 'node' undeclared (first use in this function)
ruby_prof.c:1114:36: note: each undeclared identifier is reported only once for
each function it appears in
ruby_prof.c:1114:9: error: too many arguments to function 'get_method'
ruby_prof.c:867:1: note: declared here
ruby_prof.c:1120:11: warning: passing argument 5 of 'get_method' makes pointer f
rom integer without a cast
ruby_prof.c:867:1: note: expected 'struct st_table *' but argument is of type 'i
nt'
ruby_prof.c:1120:11: error: too many arguments to function 'get_method'
ruby_prof.c:867:1: note: declared here
make: *** [ruby_prof.o] Error 1


Gem files will remain installed in C:/Ruby192/lib/ruby/gems/1.9.1/gems/ruby-prof
-0.7.3 for inspection.
Results logged to C:/Ruby192/lib/ruby/gems/1.9.1/gems/ruby-prof-0.7.3/ext/gem_ma
ke.out
An error occured while installing ruby-prof (0.7.3), and Bundler cannot continue
.
Make sure that `gem install ruby-prof -v '0.7.3'` succeeds before bundling.

我该怎么办?救命!

非常感谢!

0 个答案:

没有答案